/* Стили страницы входа */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: rgba(255, 255, 255, 0.3);
    --card-bg: rgba(255, 255, 255, 0.95);
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-dark);
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button:not(:disabled),
[role="button"] {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-box {
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 40px 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.forms-wrapper {
    position: relative;
    width: 100%;
    min-height: 420px;
}

.form-page {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(60px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-page.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 15px;
    color: var(--text-light);
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover {
    color: #495057;
    background: rgba(248, 249, 250, 0.9);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 30px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-label .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    transform: translateY(-50%);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    background: transparent;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-dark);
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.link {
    font-weight: 500;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    user-select: none;
}

.btn-primary {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.12);
    color: var(--primary-color);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.form-actions .btn {
    flex: 1;
}

.demo-credentials,
.recovery-note {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.08);
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.demo-credentials code {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.12);
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.admin-support {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.5s ease-out 1.1s forwards;
}

.admin-support p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #555;
    transform: translateY(10px);
    opacity: 0;
    animation: fadeInUp 0.4s ease-out 1.2s forwards;
}

.contact-info a {
    color: inherit;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: var(--primary-dark);
}

/* Модальное окно подтверждения восстановления */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-glass {
    width: 90%;
    max-width: 420px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    padding: 40px;
    text-align: center;
    transform: scale(0.94);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.modal-overlay.active .modal-glass {
    transform: scale(1);
    opacity: 1;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.modal-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.modal-actions {
    margin-top: 30px;
}

.modal-actions .btn {
    min-width: 160px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-box {
        padding: 32px 24px 26px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-glass {
        padding: 30px 24px;
    }

    .contact-info {
        flex-direction: column;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}




