/* Основные стили */
:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary-color: #f72585;
    --secondary-light: #ff5c9a;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #e63946;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-light: #e9ecef;
    --gray-medium: #adb5bd;
    --gray-dark: #495057;
    --text-color: #2b2d42;
    --text-light: #6c757d;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Контейнер страницы входа */
.login-container {
    display: flex;
    min-height: 100vh;
    background: white;
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 0;
}

/* Левая часть (иллюстрация и информация) */
.login-left {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-30px) translateX(-30px); }
}

.left-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
}

.logo i {
    font-size: 36px;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 300;
    opacity: 0.9;
}

.illustration {
    margin-bottom: 60px;
    text-align: center;
}

.illustration-icon {
    font-size: 80px;
    margin-bottom: 30px;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.illustration h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.illustration p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 40px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature i {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature p {
    font-size: 14px;
    opacity: 0.8;
}

.left-footer {
    position: relative;
    z-index: 1;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.left-footer p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Правая часть (форма входа) */
.login-right {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    overflow-y: auto;
}

.right-content {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.mobile-back {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 10px 0;
}

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

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

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

/* Форма входа */
.login-form {
    margin-bottom: 40px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group label i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-medium);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-password:hover {
    background: var(--gray-light);
    color: var(--primary-color);
}

.password-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

.password-hint i {
    color: var(--warning-color);
}

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.remember-me span {
    font-size: 14px;
    color: var(--text-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1) 0%, rgba(230, 57, 70, 0.05) 100%);
    border-left: 4px solid var(--danger-color);
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message i {
    color: var(--danger-color);
    font-size: 20px;
}

.error-message span {
    color: var(--danger-color);
    font-weight: 500;
}

/* Информация о ролях */
.roles-info {
    background: var(--gray-light);
    padding: 25px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 30px;
}

.roles-info h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.roles-info h4 i {
    color: var(--primary-color);
}

.roles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.role {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.role:hover {
    transform: translateX(5px);
    box-shadow: var(--box-shadow);
}

.role-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.role-icon.registry {
    background: linear-gradient(135deg, #4cc9f0 0%, #3a86ff 100%);
}

.role-icon.dean {
    background: linear-gradient(135deg, #7209b7 0%, #3a0ca3 100%);
}

.role-icon.nurse {
    background: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
}

.role-info h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.role-info p {
    font-size: 14px;
    color: var(--text-light);
}

/* Техническая поддержка */
.support {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(67, 97, 238, 0.02) 100%);
    padding: 25px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.support h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.support h4 i {
    color: var(--primary-color);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
}

/* Версия системы */
.version {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
    margin-top: 30px;
}

.version p {
    font-size: 14px;
    color: var(--text-light);
}

/* Всплывающие уведомления */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 400px;
    border-left: 4px solid var(--primary-color);
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-toast i {
    font-size: 20px;
    color: var(--primary-color);
}

.notification-error i {
    color: var(--danger-color);
}

.notification-toast span {
    flex: 1;
    font-weight: 500;
}

.close-notification {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-notification:hover {
    background: var(--gray-light);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .login-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .illustration h2 {
        font-size: 28px;
    }
    
    .illustration p {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .login-left, .login-right {
        flex: none;
        min-height: auto;
    }
    
    .login-left {
        padding: 30px;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .login-right {
        padding: 30px;
    }
    
    .mobile-back {
        display: flex;
    }
    
    .left-footer {
        display: none;
    }
    
    .version {
        display: none;
    }
}

@media (max-width: 768px) {
    .login-left, .login-right {
        padding: 20px;
    }
    
    .logo {
        margin-bottom: 40px;
    }
    
    .logo i {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .illustration {
        margin-bottom: 40px;
    }
    
    .illustration h2 {
        font-size: 24px;
    }
    
    .illustration p {
        font-size: 15px;
    }
    
    .features {
        gap: 15px;
    }
    
    .feature {
        padding: 15px;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
    
    .form-header p {
        font-size: 15px;
    }
    
    .form-group input {
        padding: 14px 16px;
    }
    
    .submit-btn {
        padding: 16px;
    }
    
    .roles-info, .support {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 20px 15px;
    }
    
    .login-right {
        padding: 20px 15px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .illustration h2 {
        font-size: 22px;
    }
    
    .illustration-icon {
        font-size: 60px;
    }
    
    .feature {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .contact-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .role {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .login-container {
        flex-direction: row;
        min-height: auto;
    }
    
    .login-left, .login-right {
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .illustration {
        margin-bottom: 30px;
    }
    
    .features {
        margin-top: 30px;
    }
    
    .form-header {
        margin-bottom: 30px;
    }
    
    .login-form {
        margin-bottom: 30px;
    }
}

/* Печать */
@media print {
    .login-left {
        display: none;
    }
    
    .login-right {
        background: white;
        color: black;
        box-shadow: none;
    }
    
    .submit-btn, .toggle-password, .mobile-back {
        display: none;
    }
    
    .form-group input {
        border: 1px solid black;
        background: white;
        color: black;
    }
}