/* Общие стили для всех страниц */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Экран авторизации */
#login-route {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

.welcome-panel {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.logo {
    width: 200px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.welcome-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 300;
}

.welcome-content span {
    font-size: 1.2em;
    opacity: 0.9;
    display: block;
    margin-bottom: 30px;
}

.demo-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.demo-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.auth-panel {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    font-size: 2em;
    margin-bottom: 40px;
    color: #2c3e50;
    font-weight: 300;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

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

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.auth-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-left: 4px solid;
    font-weight: 500;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

/* Главная панель */
#main-panel {
    display: none;
    min-height: 100vh;
    flex-direction: column;
}

/* Верхняя навигация */
.top-nav {
    background: #2c3e50;
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-main {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-items {
    display: flex;
    gap: 0;
}

.nav-item {
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
    font-size: 14px;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.nav-item:hover {
    background: #34495e;
}

.nav-item.active {
    background: #3498db;
    border-bottom-color: #2980b9;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    color: white;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    color: white;
}

.logout-btn {
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: #ecf0f1;
    background: #34495e;
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

/* Общие стили для форм */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-select, .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .welcome-panel {
        padding: 40px 20px;
    }
    
    .auth-panel {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 10px;
    }

    .nav-left {
        gap: 15px;
    }

    .nav-item {
        padding: 0 10px;
        font-size: 12px;
    }

    .nav-text {
        display: none;
    }

    .user-details {
        display: none;
    }
}

/* Добавьте эти стили в common.css */

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.card-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.card-action-btn:hover {
    background: #f8f9fa;
}

.card-content {
    padding: 20px;
}

@media (max-width: 768px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}
