* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
body {
    background: #f0f4f8;
    margin: 0;
    padding: 20px;
}
.app-container {
    max-width: 1300px;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}
.progress-bar {
    background: #e2e8f0;
    height: 6px;
}
.progress-fill {
    background: #3b82f6;
    height: 100%;
    transition: width 0.3s;
}
.step-header {
    padding: 20px 30px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
}
.step-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.stars {
    font-size: 1.3rem;
    color: #f59e0b;
    margin-left: 8px;
}
.region-badge, .user-name-badge {
    background: #eef2ff;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.step-content {
    padding: 30px;
}
.card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 25px 0;
}
.card {
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    padding: 16px 20px;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.card.selected {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
.card-check {
    margin-top: 4px;
}
.card-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.card-meta {
    font-size: 0.8rem;
    color: #4b5563;
}
.vote-count {
    background: #e2e8f0;
    border-radius: 30px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 500;
}
.solution-group {
    margin-bottom: 28px;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 20px;
}
.solution-group-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.solution-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}
.solution-tag {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    padding: 8px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.solution-tag.selected {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}
.obstacle-block {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 16px;
}
.obstacle-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.obstacle-row input, .obstacle-row textarea {
    flex: 1;
    min-width: 200px;
}
.partner-card {
    background: #f9fafb;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e4e7ec;
}
.partner-card-group {
    margin-bottom: 20px;
}
.partner-entry {
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    padding: 12px;
    margin-top: 12px;
}
.roles-selector {
    margin: 8px 0;
}
.role-tag {
    background: #e2e8f0;
    border: none;
    padding: 4px 12px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
}
.role-tag.selected {
    background: #3b82f6;
    color: white;
}
.step-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.step-row input, .step-row select {
    flex: 1;
    min-width: 150px;
}
.custom-input {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
input, textarea, select {
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    font-size: 0.9rem;
}
button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
button.secondary {
    background: #e2e8f0;
    color: #1e293b;
}
button.small {
    padding: 6px 16px;
    font-size: 0.8rem;
}
button.danger {
    background: #dc2626;
}
button.danger:hover {
    background: #b91c1c;
}
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}
.error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 8px;
}
.profile-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
}
.avatar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.avatar-option.selected {
    border-color: #3b82f6;
}
.lock-message {
    background: #fee2e2;
    padding: 12px;
    border-radius: 20px;
    text-align: center;
    margin-top: 20px;
    color: #b91c1c;
}
.suggestions-box {
    border-radius: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: white;
    z-index: 1000;
}
.suggestions-box div {
    padding: 10px 14px;
    cursor: pointer;
}
.suggestions-box div:hover {
    background-color: #eef2ff;
}

/* ========== ДИАГРАММА ГАНТА ========== */
.gantt-card {
    margin: 24px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}
.gantt-container {
    overflow-x: auto;
}
.gantt-chart {
    min-width: 600px;
}
.gantt-header {
    display: grid;
    grid-template-columns: 240px 1fr 100px;
    background: #f8fafc;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
}
.gantt-row {
    display: grid;
    grid-template-columns: 240px 1fr 100px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}
.gantt-task {
    padding: 12px 16px;
    font-weight: 500;
}
.gantt-bar-container {
    padding: 12px 16px;
    position: relative;
}
.gantt-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
}

/* ========== КАТАЛОГ ========== */
.catalog-item {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}
.catalog-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.comments-list {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px;
    max-height: 150px;
    overflow-y: auto;
}
.vote-btn {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}
.vote-btn:hover {
    background: #cbd5e1;
}
.view-full-plan-btn {
    background: #8b5cf6;
    color: white;
}
.view-full-plan-btn:hover {
    background: #7c3aed;
}
.add-comment-btn {
    background: #10b981;
}
.add-comment-btn:hover {
    background: #059669;
}
details summary {
    cursor: pointer;
    font-weight: 600;
}

/* ========== МОДАЛЬНОЕ ОКНО (для полного плана) ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
}
.close:hover {
    color: #1e293b;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 680px) {
    .step-content { padding: 20px; }
    .solution-tag { padding: 5px 12px; }
    .step-row { flex-direction: column; }
    .gantt-header, .gantt-row {
        grid-template-columns: 180px 1fr 80px;
    }
    .step-title { font-size: 1.4rem; }
}