/* Базовые стили */
:root {
    --primary-color: #f5a623;
    --secondary-color: #0077be;
    --text-color: #333333;
    --bg-color: #d9eaf7;
    --surface-color: #ffffff;
    --border-color: #e0e0e0;
    --hover-color: #f5f5f5;
    --font-family: 'Roboto', sans-serif;
    --header-bg: #0077be;
    --tab-active-color: #f5a623;
    --method-header-bg: #0088cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: var(--header-bg);
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.logo svg {
    height: 30px;
    color: #ffffff;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f8f8;
}

.tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    color: var(--secondary-color);
    background-color: transparent;
}

.tab.active {
    color: var(--tab-active-color);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--surface-color);
}

.tab:hover:not(.active) {
    background-color: rgba(0, 119, 190, 0.05);
}

/* Auth Content */
.auth-content {
    padding: 2rem;
}

.method-header {
    padding: 0.875rem 1rem;
    background-color: var(--method-header-bg);
    color: #ffffff;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.method-title {
    font-weight: 400;
    font-size: 1rem;
}

.method-description {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.icon-info::before {
    content: 'ℹ';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Form */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    background-color: var(--surface-color);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-wrapper label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: var(--surface-color);
    padding: 0 0.25rem;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label,
.input-wrapper input:valid+label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.btn-submit:hover {
    background-color: #e09730;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(241, 164, 53, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Status Message */
.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.link-text {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.link-action {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.link-action:hover {
    color: #1a7fb0;
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--header-bg);
    color: #ffffff;
    padding: 1.5rem 2rem;
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo svg {
    height: 35px;
    color: #ffffff;
}

.footer-copyright {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-copyright a {
    color: #ffffff;
    text-decoration: none;
}

.footer-menu ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: var(--tab-active-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .auth-card {
        margin: 0;
        border-radius: 0;
    }

    .auth-content {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-menu ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}