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

:root {
    --primary-green: #2e7d32;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --white: #ffffff;
    --gray: #757575;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--light-gray);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== HEADER ========== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    min-height: 70px;
}

.logo {
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
}

.logo h1 {
    margin: 0;
    color: #2e7d32;
    font-size: 22px;
}

.logo p {
    margin: 0;
    color: #757575;
    font-size: 10px;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav__link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav__link:hover,
.nav__link.active {
    color: #2e7d32;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn {
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    border: none;
}

.btn--primary {
    background: #2e7d32;
    color: white;
}

.btn--primary:hover {
    background: #1b5e20;
}

.btn--outline {
    background: transparent;
    border: 2px solid #2e7d32;
    color: #2e7d32;
}

.btn--outline:hover {
    background: #2e7d32;
    color: white;
}

/* ========== ОСНОВНЫЕ СЕКЦИИ ========== */
.hero {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    padding: 120px 0 80px;
    margin-top: 70px;
    text-align: center;
}

.hero__title {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero__subtitle {
    font-size: 18px;
    opacity: 0.9;
}

.projects {
    padding: 60px 0;
}

/* ========== КАРТОЧКИ ПРОЕКТОВ ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-title {
    color: var(--dark-green);
    font-size: 20px;
    margin-bottom: 10px;
}

.project-description {
    color: #555;
    font-size: 14px;
    margin-bottom: 15px;
}

.project-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.status-draft { background: #e3f2fd; color: #1976d2; }
.status-pending { background: #fff3e0; color: #ff9800; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-archived { background: #eee; color: #757575; }

.project-directions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.direction-tag {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* ========== ФИЛЬТРЫ ========== */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 2;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    flex: 1;
    min-width: 140px;
    white-space: normal;
    word-break: break-word;
}

.filter-select option {
    white-space: normal;
    word-break: break-word;
    padding: 8px;
}

.create-btn {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ========== СТАТИСТИКА ========== */
.stats-section {
    padding: 60px 0;
    background: #e8f5e9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 48px;
    color: #2e7d32;
    font-weight: bold;
}

.stat-label {
    font-size: 16px;
    color: #555;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark-green);
    color: white;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #4caf50;
}

.footer-section p, .footer-section li {
    margin-bottom: 8px;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    opacity: 0.7;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #999;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal__content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal__close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.modal__tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.tab-btn.active {
    color: #2e7d32;
    border-bottom: 2px solid #2e7d32;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header__inner {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
        min-height: auto;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .nav {
        width: 100%;
    }
    
    .nav__list {
        justify-content: space-between;
        gap: 15px;
    }
    
    .nav__link {
        font-size: 13px;
        white-space: normal;
        text-align: center;
    }
    
    .auth-buttons {
        width: 100%;
    }
    
    .auth-buttons .btn {
        flex: 1;
        text-align: center;
    }
    
    .hero {
        margin-top: 110px;
        padding: 60px 0 40px;
    }
    
    .hero__title {
        font-size: 28px;
    }
    
    .hero__subtitle {
        font-size: 16px;
    }
    
    .projects-header {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
        min-width: auto;
    }
    
    .create-btn {
        width: 100%;
        text-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}