/* Основные стили */
:root {
    --primary-color: #8a2be2;
    --primary-dark: #6a0dad;
    --primary-light: #9b59b6;
    --secondary-color: #d8bfd8;
    --accent-color: #ff69b4;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f9f6ff;
    --card-bg: #ffffff;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --shadow: 0 10px 30px rgba(138, 43, 226, 0.1);
    --shadow-hover: 0 15px 40px rgba(138, 43, 226, 0.2);
    --gradient-primary: linear-gradient(135deg, #8a2be2 0%, #9b59b6 100%);
    --gradient-secondary: linear-gradient(135deg, #d8bfd8 0%, #e6e6fa 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
}

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

/* Header Styles */
header {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 43, 226, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.logo-text h1 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 0;
}

.logo-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.user-email {
    font-size: 0.9rem;
    color: var(--text-light);
}

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

/* Navigation */
nav {
    background: rgba(138, 43, 226, 0.05);
    border-radius: 15px;
    padding: 10px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-item {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(138, 43, 226, 0.1);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

.nav-link i {
    font-size: 16px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(138, 43, 226, 0.1);
}

.page-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
}

.page-header h1 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 43, 226, 0.1);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
}

.card-title i {
    font-size: 24px;
    color: var(--primary-color);
}

.card-title h2 {
    color: var(--primary-dark);
    margin: 0;
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(138, 43, 226, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Filter and Search */
.filter-section {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

/* Proposal Cards */
.proposals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.proposal-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 43, 226, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.proposal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

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

.proposal-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-under_review { background: #fff3e0; color: #f57c00; }
.status-approved { background: #e8f5e9; color: #388e3c; }
.status-in_progress { background: #e8eaf6; color: #3949ab; }
.status-completed { background: #f1f8e9; color: #689f38; }
.status-rejected { background: #ffebee; color: #d32f2f; }

.proposal-votes {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e74c3c;
    font-weight: 600;
}

.proposal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.proposal-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.proposal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(138, 43, 226, 0.1);
}

.proposal-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.author-info {
    font-size: 13px;
}

.author-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.author-date {
    color: var(--text-light);
    font-size: 12px;
}

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

/* Alerts */
.alert {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left-color: var(--primary-color);
    color: #0c5460;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

/* Form Elements */
.form-section {
    margin-bottom: 30px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-label i {
    color: var(--primary-color);
}

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

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.4;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(138, 43, 226, 0.1);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    color: var(--text-light);
    font-size: 14px;
    border-top: 1px solid rgba(138, 43, 226, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .proposals-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .proposals-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}