/* ============================================
   FEEDBACK & COMMUNITY STYLES
   ============================================ */

.feedback-hero,
.community-hero {
    padding: calc(80px + 4rem) 0 3rem;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feedback-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    opacity: 0.5;
    animation: gradient-shift 15s ease infinite;
}

.feedback-hero .container {
    position: relative;
    z-index: 1;
}

.feedback-hero-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.25);
    animation: fade-in-up 0.6s ease-out;
}

html.dark body .feedback-hero-icon {
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.3);
}

.feedback-content {
    padding: 3rem 0 5rem;
    background: var(--bg-primary);
}

.feedback-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.feedback-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--neutral-200);
    background: var(--bg-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-tab:hover {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
    transform: translateY(-1px);
}

.feedback-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

html.dark body .feedback-tab {
    border-color: var(--neutral-700);
    background: var(--bg-secondary);
}

html.dark body .feedback-tab.active {
    background: var(--gradient-primary);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.feedback-panels {
    max-width: 1000px;
    margin: 0 auto;
}

.feedback-panel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.feedback-panel.active {
    display: block;
}

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

.feedback-form-card {
    background: var(--bg-primary);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--neutral-200);
    transition: box-shadow 0.3s ease;
}

.feedback-form-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

html.dark body .feedback-form-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--neutral-700);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

html.dark body .feedback-form-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
}

html.dark body .form-card-header {
    border-bottom-color: var(--neutral-700);
}

.form-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    flex-shrink: 0;
}

.form-card-icon.feature {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-indigo);
}

html.dark body .form-card-icon.feature {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-purple);
}

.form-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.form-card-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.feedback-form .form-group {
    margin-bottom: 1.5rem;
}

.feedback-form .form-group:last-of-type {
    margin-bottom: 1.25rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 0.375rem;
    line-height: 1.5;
}

.severity-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
}

@media (max-width: 576px) {
    .severity-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.severity-option {
    position: relative;
    padding: 0.875rem 0.5rem;
    border: 2px solid var(--neutral-200);
    background: var(--bg-primary);
    border-radius: 0.625rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.severity-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.severity-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.severity-option:hover {
    border-color: currentColor;
}

.severity-option:hover .severity-indicator {
    transform: scale(1.2);
    opacity: 0.8;
}

.severity-option.selected {
    border-color: currentColor;
    background: rgba(99, 102, 241, 0.06);
}

.severity-option.selected .severity-indicator {
    transform: scale(1.3);
    opacity: 1;
}

.severity-label {
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.item-tags {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.state-badge,
.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: capitalize;
    background: var(--neutral-100);
    color: var(--text-primary);
    border: 1px solid var(--neutral-200);
}

.state-badge {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--primary-indigo);
}

.state-TRIAGE { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); color: var(--primary-indigo); }
.state-IDENTIFIED { background: rgba(14,165,233,0.08); border-color: rgba(14,165,233,0.2); color: #0ea5e9; }
.state-IN_PROGRESS { background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.2); color: #a16207; }
.state-FIXED { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); color: #047857; }
.state-NOT_A_BUG { background: rgba(107,114,128,0.12); border-color: rgba(107,114,128,0.25); color: #374151; }
.state-BLOCKED { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.25); color: #b91c1c; }

.severity-LOW { color: #22c55e; }
.severity-MEDIUM { color: #f59e0b; }
.severity-HIGH { color: #f97316; }
.severity-CRITICAL { color: #ef4444; }

.severity-LOW.selected { background: rgba(34, 197, 94, 0.08); }
.severity-MEDIUM.selected { background: rgba(245, 158, 11, 0.08); }
.severity-HIGH.selected { background: rgba(249, 115, 22, 0.08); }
.severity-CRITICAL.selected { background: rgba(239, 68, 68, 0.08); }

html.dark body .severity-option {
    border-color: var(--neutral-700);
    background: var(--bg-secondary);
}

html.dark body .severity-LOW.selected { background: rgba(34, 197, 94, 0.12); }
html.dark body .severity-MEDIUM.selected { background: rgba(245, 158, 11, 0.12); }
html.dark body .severity-HIGH.selected { background: rgba(249, 115, 22, 0.12); }
html.dark body .severity-CRITICAL.selected { background: rgba(239, 68, 68, 0.12); }

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0.75rem;
}

.option-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.option-input-row .form-input {
    flex: 1;
    padding-left: 1rem;
}

.remove-option-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-option-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.05);
}

.add-option-btn {
    margin-top: 0.5rem;
    padding: 0.625rem 1rem;
    border: 2px dashed var(--neutral-300);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
}

.add-option-btn:hover {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
    background: rgba(99, 102, 241, 0.04);
}

html.dark body .add-option-btn {
    border-color: var(--neutral-600);
}

html.dark body .add-option-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.08);
}

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-zone {
    border: 2px dashed var(--neutral-300);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-tertiary);
    position: relative;
    overflow: hidden;
}

.upload-zone p {
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.upload-zone-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.upload-zone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.upload-zone:hover {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
    background: rgba(99, 102, 241, 0.03);
}

.upload-zone.drag-over {
    border-color: var(--primary-indigo);
    background: rgba(99, 102, 241, 0.06);
    transform: scale(1.01);
}

.upload-zone.uploading {
    pointer-events: none;
    opacity: 0.7;
}

html.dark body .upload-zone {
    border-color: var(--neutral-600);
}

html.dark body .upload-zone:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.06);
}

html.dark body .upload-zone.drag-over {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.upload-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--primary-indigo);
}

html.dark body .upload-loading {
    color: var(--primary-purple);
}

.upload-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--neutral-200);
    border-top-color: var(--primary-indigo);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

html.dark body .upload-spinner {
    border-color: var(--neutral-600);
    border-top-color: var(--primary-purple);
}

.upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.upload-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    animation: fadeIn 0.25s ease-out;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(239, 68, 68, 0.85);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.upload-preview:hover .upload-preview-remove {
    opacity: 1;
}

html.dark body .upload-preview {
    border-color: var(--neutral-700);
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn.is-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3) !important;
}

.btn.is-error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3) !important;
}

.form-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-message.success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

html.dark body .form-message.success {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.25);
}

html.dark body .form-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.guidelines-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    position: sticky;
    top: 100px;
}

html.dark body .guidelines-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--neutral-700);
}

.guidelines-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    color: var(--primary-indigo);
}

html.dark body .guidelines-header {
    color: var(--primary-purple);
}

.guidelines-header h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guidelines-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.guidelines-list li:last-child {
    margin-bottom: 0;
}

.guidelines-list li i {
    color: var(--primary-indigo);
    flex-shrink: 0;
    margin-top: 1px;
}

html.dark body .guidelines-list li i {
    color: var(--primary-purple);
}

.login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: 1.25rem;
    border: 1px solid var(--neutral-200);
}

html.dark body .login-prompt {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--neutral-700);
}

.login-prompt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-indigo);
}

html.dark body .login-prompt-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-purple);
}

.login-prompt h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
}

.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.form-group.is-focused .form-label {
    color: var(--primary-indigo);
}

html.dark body .form-group.is-focused .form-label {
    color: var(--primary-purple);
}

.form-textarea:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

html.dark body .form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background-image: linear-gradient(var(--neutral-800), var(--neutral-800)), var(--gradient-primary);
}

.bug-report-hero {
    padding: calc(80px + 4rem) 0 3rem;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bug-report-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.08), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.06), transparent 40%);
    animation: gradient-shift 15s ease infinite;
}

.bug-report-hero .container {
    position: relative;
    z-index: 1;
}

.bug-report-hero-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 16px 48px rgba(239, 68, 68, 0.25);
    animation: fade-in-up 0.6s ease-out;
}

.bug-report-content {
    padding: 3rem 0 5rem;
    background: var(--bg-primary);
}

.bug-report-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.steps-section {
    margin-top: 0.75rem;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.step-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--primary-indigo);
    flex-shrink: 0;
}

html.dark body .step-number {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-purple);
}

.step-input-row .form-input {
    flex: 1;
    padding-left: 1rem;
}

.add-step-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px dashed var(--neutral-300);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
}

.add-step-btn:hover {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
}

html.dark body .add-step-btn {
    border-color: var(--neutral-600);
}

html.dark body .add-step-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

@media (max-width: 768px) {
    .feedback-hero,
    .community-hero,
    .bug-report-hero {
        padding: calc(80px + 2rem) 0 2rem;
    }
    
    .feedback-hero-icon,
    .community-hero-icon,
    .bug-report-hero-icon {
        width: 72px;
        height: 72px;
    }
    
    .feedback-hero-icon i,
    .community-hero-icon i,
    .bug-report-hero-icon i {
        width: 36px !important;
        height: 36px !important;
    }
    
    .feedback-content,
    .community-content,
    .bug-report-content {
        padding: 2rem 0 3rem;
    }
    
    .feedback-form-card {
        padding: 1.5rem;
    }
    
    .form-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .guidelines-card {
        margin-top: 1.5rem;
        position: static;
    }
}

/* ============================================
   COMMUNITY HERO
   ============================================ */

.community-hero-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.25);
    animation: fade-in-up 0.6s ease-out;
}

html.dark body .community-hero-icon {
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.3);
}

.community-actions {
    margin-top: 1.5rem;
}

.feedback-nav-links {
    margin-top: 1.5rem;
}

.feedback-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--neutral-200);
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.feedback-nav-link:hover {
    color: var(--primary-indigo);
    border-color: var(--primary-indigo);
    transform: translateY(-1px);
}

html.dark body .feedback-nav-link {
    border-color: var(--neutral-700);
    background: var(--bg-secondary);
}

html.dark body .feedback-nav-link:hover {
    color: var(--primary-purple);
    border-color: var(--primary-purple);
}

/* ============================================
   COMMUNITY CONTENT
   ============================================ */

.community-content {
    padding: 3rem 0 5rem;
    background: var(--bg-primary);
}

.community-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.community-tab {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--neutral-200);
    background: var(--bg-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.community-tab:hover {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
    transform: translateY(-1px);
}

.community-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.community-tab .tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

.community-tab:not(.active) .tab-count {
    background: var(--neutral-100);
    color: var(--text-tertiary);
}

html.dark body .community-tab {
    border-color: var(--neutral-700);
    background: var(--bg-secondary);
}

html.dark body .community-tab:not(.active) .tab-count {
    background: var(--neutral-700);
}

html.dark body .community-tab.active {
    background: var(--gradient-primary);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.community-panels {
    max-width: 900px;
    margin: 0 auto;
}

.community-panel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.community-panel.active {
    display: block;
}

/* ============================================
   COMMUNITY LIST
   ============================================ */

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

.community-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--neutral-200);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.community-item:hover {
    border-color: var(--primary-indigo);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

html.dark body .community-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--neutral-700);
}

html.dark body .community-item:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.item-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 48px;
}

.vote-btn {
    width: 36px;
    height: 28px;
    border: none;
    background: var(--neutral-100);
    color: var(--text-tertiary);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vote-btn:hover:not(.disabled) {
    background: var(--primary-indigo);
    color: white;
}

.vote-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

html.dark body .vote-btn {
    background: var(--neutral-700);
}

html.dark body .vote-btn:hover:not(.disabled) {
    background: var(--primary-purple);
}

.vote-count {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.vote-count.positive {
    color: #22c55e;
}

.vote-count.negative {
    color: #ef4444;
}

.item-content {
    flex: 1;
    min-width: 0;
}

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

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.severity-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.severity-badge.severity-LOW {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.severity-badge.severity-MEDIUM {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.severity-badge.severity-HIGH {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.severity-badge.severity-CRITICAL {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.item-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-author,
.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ============================================
   COMMUNITY LOADING & EMPTY STATES
   ============================================ */

.community-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-indigo);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-sm {
    width: 24px;
    height: 24px;
    border: 2px solid var(--neutral-200);
    border-top-color: var(--primary-indigo);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

html.dark body .loading-spinner,
html.dark body .loading-spinner-sm {
    border-color: var(--neutral-600);
    border-top-color: var(--primary-purple);
}

.community-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.community-empty i {
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.community-empty p {
    margin-bottom: 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.community-pagination {
    margin-top: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--neutral-200);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary-indigo);
    color: var(--primary-indigo);
}

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

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-tertiary);
}

html.dark body .pagination-btn {
    border-color: var(--neutral-700);
    background: var(--bg-secondary);
}

/* ============================================
   DETAIL MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-primary);
    border-radius: 1.5rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.is-open .modal-container {
    transform: translateY(0);
}

html.dark body .modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--neutral-700);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--neutral-200);
}

html.dark body .modal-header {
    border-bottom-color: var(--neutral-700);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--neutral-100);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
}

html.dark body .modal-close {
    background: var(--neutral-700);
}

html.dark body .modal-close:hover {
    background: var(--neutral-600);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.modal-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.modal-description {
    color: var(--text-primary);
    line-height: 1.7;
}

.modal-description p {
    margin: 0;
}

.modal-images {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.modal-images a {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
}

.modal-images img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

html.dark body .modal-images a {
    border-color: var(--neutral-700);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--neutral-200);
    border-bottom: 1px solid var(--neutral-200);
}

html.dark body .modal-footer {
    border-color: var(--neutral-700);
}

.modal-vote-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.modal-vote-group .vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    width: auto;
    height: auto;
}

.vote-score {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: center;
}

.vote-score.positive {
    color: #22c55e;
}

.vote-score.negative {
    color: #ef4444;
}

/* ============================================
   COMMENTS
   ============================================ */

.modal-comments {
    padding: 1.5rem;
    background: var(--bg-secondary);
    max-height: 300px;
    overflow-y: auto;
}

html.dark body .modal-comments {
    background: rgba(0, 0, 0, 0.2);
}

.comments-header {
    margin-bottom: 1rem;
}

.comments-header h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-form .form-textarea {
    resize: none;
}

.comment-form .btn {
    align-self: flex-end;
}

.comment-upgrade-prompt,
.comment-login-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.comment-upgrade-prompt a,
.comment-login-prompt a {
    color: var(--primary-indigo);
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
}

.comment-upgrade-prompt a:hover,
.comment-login-prompt a:hover {
    text-decoration: underline;
}

html.dark body .comment-upgrade-prompt a,
html.dark body .comment-login-prompt a {
    color: var(--primary-purple);
}

html.dark body .comment-upgrade-prompt,
html.dark body .comment-login-prompt {
    background: rgba(255, 255, 255, 0.05);
}

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

.comments-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    padding: 1rem;
}

.comments-loading {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.comment {
    display: flex;
    gap: 0.75rem;
}

.comment-reply {
    margin-left: 2.5rem;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar span {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

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

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.comment-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
}

.comment-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-vote-btn:hover:not(.disabled) {
    background: var(--neutral-100);
    color: var(--primary-indigo);
}

.comment-vote-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

html.dark body .comment-vote-btn:hover:not(.disabled) {
    background: var(--neutral-700);
    color: var(--primary-purple);
}

.comment-replies {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   PERMISSION PROMPT
   ============================================ */

.permission-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: 1.25rem;
    border: 1px solid var(--neutral-200);
    max-width: 500px;
    margin: 0 auto;
}

html.dark body .permission-prompt {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--neutral-700);
}

.permission-prompt-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-indigo);
}

html.dark body .permission-prompt-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    color: var(--primary-purple);
}

.permission-prompt h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
}

.permission-prompt > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.permission-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
    background: var(--bg-primary);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
}

html.dark body .permission-benefits {
    background: rgba(255, 255, 255, 0.03);
}

.permission-benefit {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.permission-benefit i {
    color: #22c55e;
    flex-shrink: 0;
}

.permission-note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ============================================
   SIMPLE TOAST (Fallback)
   ============================================ */

.simple-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--neutral-200);
    z-index: 2000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-primary);
}

.simple-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.simple-toast.toast-success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.simple-toast.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.simple-toast.toast-warn {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

html.dark body .simple-toast {
    background: var(--bg-secondary);
    border-color: var(--neutral-700);
}

html.dark body .simple-toast.toast-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

html.dark body .simple-toast.toast-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

html.dark body .simple-toast.toast-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* ============================================
   BUTTON SIZES
   ============================================ */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
