/* Section navigation tabs */
.section-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e8ed;
    overflow-x: auto;
    min-height: 60px;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #657786;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: #1a1a1a;
    background-color: #f7f9fa;
}

.tab-button.active {
    color: #1d9bf0;
    border-bottom-color: #1d9bf0;
    background-color: #f0f8ff;
}

.tab-button i {
    font-size: 1.1rem;
}

/* Content sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-description {
    font-size: 1.1rem;
    color: #657786;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards grid layout */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #657786;
    margin-bottom: 1rem;
}

.card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.card-status.backlog {
    background: #f3f4f6;
    color: #374151;
}

.card-status.ready {
    background: #fef3c7;
    color: #92400e;
}

.card-status.in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.card-status.in-review {
    background: #ede9fe;
    color: #5b21b6;
}

.card-status.completed,
.card-status.done {
    background: #d1fae5;
    color: #065f46;
}

.card-description {
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
}

.card-author {
    font-size: 0.875rem;
    color: #657786;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Document viewer styles */
.document-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
    text-align: center;
}

.document-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.document-voting {
    display: flex;
    gap: 0.75rem;
}

.vote-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
}

.vote-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.vote-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.vote-btn i {
    font-size: 1rem;
}

/* Author type indicator */
.author-type {
    font-size: 0.75rem;
    color: #657786;
    margin-left: 0.25rem;
}

/* Document comments */
.document-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f3f4;
}

.document-comments h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Document reviews */
.document-reviews {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f3f4;
}

.document-reviews h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-type {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.review-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.review-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background-color: #f59e0b;
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.review-link:hover {
    background-color: #d97706;
    color: white;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.comment-body {
    color: #374151;
    line-height: 1.6;
}

.comment-body p {
    margin-bottom: 0.5rem;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

.card-links {
    display: flex;
    gap: 0.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background-color: #f7f9fa;
    color: #1d9bf0;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.card-link:hover {
    background-color: #1d9bf0;
    color: white;
}

/* Document modal styles */
.document-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.document-content {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e8ed;
}

.document-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.document-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #657786;
}

.document-links {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.document-body {
    line-height: 1.6;
    color: #1a1a1a;
}

.document-body h1,
.document-body h2,
.document-body h3 {
    color: #1a1a1a;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.document-body h1 { font-size: 1.5rem; }
.document-body h2 { font-size: 1.3rem; }
.document-body h3 { font-size: 1.1rem; }

.document-body p {
    margin-bottom: 1rem;
}

.document-body ul,
.document-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.document-body li {
    margin-bottom: 0.25rem;
}

.document-body code {
    background-color: #f7f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.document-body pre {
    background-color: #f7f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* Human review section */
.human-review-section {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.human-review-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.form-group textarea,
.form-group select,
.form-group input {
    padding: 0.75rem;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus,
.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #1d9bf0;
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Loading states */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #657786;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading p {
    font-size: 1.1rem;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #657786;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.empty-state p {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .section-tabs {
        justify-content: flex-start;
        padding: 0 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .document-modal {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* About page styles */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.about-section h3 {
    margin-bottom: 0.75rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.about-section h3 i {
    color: #3b82f6;
    font-size: 1.125rem;
}

.about-section p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.workflow-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stage {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 3px solid #e5e7eb;
    border: 1px solid #f3f4f6;
}

.stage-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.stage-icon.backlog {
    background: #6b7280;
}

.stage-icon.ready {
    background: #f59e0b;
}

.stage-icon.in-progress {
    background: #3b82f6;
}

.stage-icon.in-review {
    background: #7c3aed;
}

.stage-icon.done {
    background: #10b981;
}

.stage-content h4 {
    margin-bottom: 0.25rem;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 600;
}

.stage-content p {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.4;
}

.about-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.about-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.about-link:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

.about-link i {
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .about-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .workflow-stages {
        grid-template-columns: 1fr;
    }
    
    .stage {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .about-links {
        flex-direction: column;
        align-items: center;
    }
    
    .about-link {
        width: 100%;
        justify-content: center;
        max-width: 250px;
    }
}