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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* Шапка приложения */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 40px;
}

.app-title {
    display: flex;
    flex-direction: column;
}

.app-title h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.app-title p {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-section:hover {
    background: rgba(255,255,255,0.25);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFA500, #FF6347);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.85;
}

/* Навигационное меню */
.header-nav {
    padding: 0 20px;
}

.main-menu {
    display: flex;
    gap: 5px;
    list-style: none;
    overflow-x: auto;
}

.main-menu::-webkit-scrollbar {
    height: 4px;
}

.main-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.menu-item {
    position: relative;
}

.menu-item > a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
}

.menu-item > a:hover,
.menu-item.active > a {
    background: rgba(255,255,255,0.15);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
}

.menu-item:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown a:hover {
    background: #f0f2f5;
}

/* Основной контент */
.main-content {
    padding: 20px;
}

.section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e7ff;
    color: #667eea;
}

.btn-secondary:hover {
    background: #c7d2fe;
}

/* Зона задач CRM */
.tasks-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.tasks-column {
    flex: 1;
    min-width: 280px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

.column-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.task-card {
    background: white;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.task-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.task-id {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
}

.task-priority {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.priority-high {
    background: #fee;
    color: #c00;
}

.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.task-description {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Зона IT-инфраструктуры */
.infrastructure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.infrastructure-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.infrastructure-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.infrastructure-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.infrastructure-icon {
    font-size: 32px;
}

.infrastructure-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.infrastructure-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.stat-value.online {
    color: #28a745;
}

.stat-value.offline {
    color: #dc3545;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.total {
    color: #667eea;
}

/* Зона обслуживания */
.maintenance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
}

.maintenance-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s;
}

.maintenance-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.maintenance-type {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.type-refill {
    background: #d1ecf1;
    color: #0c5460;
}

.type-repair {
    background: #f8d7da;
    color: #721c24;
}

.type-setup {
    background: #d4edda;
    color: #155724;
}

.type-purchase {
    background: #fff3cd;
    color: #856404;
}

.maintenance-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.maintenance-details {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
}

.maintenance-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.maintenance-date {
    font-size: 12px;
    color: #6c757d;
}

.maintenance-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-progress {
    background: #cfe2ff;
    color: #084298;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

/* Адаптивность */
@media (max-width: 992px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .main-menu {
        flex-wrap: wrap;
    }

    .tasks-container {
        flex-direction: column;
    }

    .tasks-column {
        min-width: 100%;
    }
}

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

    .main-content {
        padding: 10px;
    }

    .section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .app-title h1 {
        font-size: 18px;
    }

    .user-section {
        padding: 6px 12px;
    }

    .infrastructure-grid,
    .maintenance-grid {
        grid-template-columns: 1fr;
    }
}
