/* Основные стили для темной темы */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    color: #e2e8f0;
    line-height: 1.6;
}

form {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    border: 1px solid #334155;
}

form:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #f8fafc;
    font-weight: 600;
}

form div {
    margin-bottom: 1.5rem;
    position: relative;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.3s ease;
}

form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #f8fafc;
}

form input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
    background: #0f172a;
}

form button {
    width: 100%;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

form button:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

form button:active {
    transform: translateY(0);
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    animation: slideDown 0.4s ease-out;
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.15);
    border-left: 4px solid #ef4444;
    color: #fca5a5;
}

.alert-warning {
    background-color: rgba(234, 179, 8, 0.15);
    border-left: 4px solid #f59e0b;
    color: #fcd34d;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.15);
    border-left: 4px solid #60a5fa;
    color: #93c5fd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    body {
        align-items: flex-start;
        padding-top: 2rem;
    }
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset;
    -webkit-text-fill-color: #f8fafc;
    border: 2px solid #334155;
    transition: background-color 5000s ease-in-out 0s;
}

::placeholder {
    color: #64748b;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #64748b;
}

::-ms-input-placeholder {
    color: #64748b;
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}


.dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.login-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #f8fafc;
}

.login-header p {
    color: #94a3b8;
    margin-bottom: 0;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

#passw-inp{
    display: flex;
    flex-direction: row;
    align-items: anchor-center;
}

.toggle-password {
    margin: 0 10px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #94a3b8;
}

.form-actions {
    margin-top: 2rem;
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.forgot-password {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.alert i {
    margin-right: 8px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .form-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}