/* ============================================
   КОМИТЕТ КОНТРОЛИРУЕМОГО ХАОСА - HUGGING FACE STYLE
   ============================================ */

:root {
    /* Цветовая палитра Hugging Face */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #21262d;
    --border-color: #30363d;
    
    /* Градиенты (НАСТОЯЩИЕ ЦВЕТА) */
    --gradient-1: linear-gradient(135deg, #f7df1e 0%, #ffcc00 100%);
    --gradient-2: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --gradient-3: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-4: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-5: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    --gradient-6: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    
    /* Текст */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* Акценты */
    --accent-primary: #f7df1e;
    --accent-success: #2ea043;
    --accent-danger: #da3633;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 24px;
    margin-right: 8px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn:hover {
    background: var(--bg-secondary);
}

.btn-primary {
    background: var(--accent-primary);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: #e6cf00;
}

/* CATEGORY FILTERS */
.category-filters {
    display: flex;
    gap: 8px;
    padding: 20px 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--bg-secondary);
}

.category-btn.active {
    background: var(--accent-primary);
    color: #000;
}

/* MAIN CONTENT */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 120px 24px 40px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
}

/* PROJECT CARDS - ГРАДИЕНТЫ РАБОТАЮТ */
.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--text-muted);
}

.card-gradient {
    height: 80px;
    position: relative;
}

.card-content {
    padding: 20px;
}

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

.project-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-card .description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.в-работе {
    background: rgba(247, 223, 30, 0.2);
    color: var(--accent-primary);
}

.status-badge.на-паузе {
    background: rgba(139, 148, 158, 0.2);
    color: var(--text-secondary);
}

.status-badge.завершён {
    background: rgba(46, 160, 67, 0.2);
    color: var(--accent-success);
}

/* PROJECT DETAIL */
.project-detail-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.project-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-title-section h2 {
    font-size: 28px;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

/* TABS */
.dashboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* KANBAN */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    min-height: 500px;
}

.kanban-column h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: move;
}

.task-card:hover {
    border-color: var(--text-muted);
}

.task-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* LISTS */
.team-list, .documents-list, .risks-list {
    display: grid;
    gap: 12px;
}

.team-item, .document-item, .risk-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.team-item h4, .document-item h4, .risk-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* LOGIN */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.login-box h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.login-box p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.login-box input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 16px;
}

.error-message {
    color: var(--accent-danger);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .projects-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    .search-bar {
        display: none;
    }
    .app-container {
        padding: 100px 16px 24px;
    }
    .projects-list {
        grid-template-columns: 1fr;
    }
    .kanban-board {
        grid-template-columns: 1fr;
    }
}
