/* Table Design */
.table-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.ideas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ideas-table th {
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.ideas-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.ideas-table tr:hover td {
    background: var(--surface-hover);
}

.ideas-table tr.assimilated {
    opacity: 0.5;
}

/* Columns */
.col-priority { width: 50px; text-align: center !important; }
.col-content { width: auto; min-width: 200px; }
.col-owner { width: 90px; }
.col-groups { width: 110px; }
.col-category { width: 100px; }
.col-tags { width: 140px; }
.col-files { width: 100px; text-align: center !important; }
.col-date { width: 100px; text-align: center !important; }
.col-actions { width: 130px; text-align: center !important; }

/* Cell Content */
.idea-content-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.idea-text {
    font-weight: 400;
    color: var(--text-primary);
    display: block;
    max-width: 100%;
}

.assimilated-info {
    font-size: 0.75rem;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Badges */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-priority {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-radius: 50%;
    margin: 0 auto;
}

.priority-low { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.priority-high { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.badge-category {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(0, 210, 255, 0.2);
    text-transform: lowercase;
    font-size: 0.7rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.badge-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
}

/* Actions */
.action-group {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-icon.assimilate:hover { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: var(--success); }
.btn-icon.restore:hover { background: rgba(138, 43, 226, 0.1); color: var(--accent-primary); border-color: var(--accent-primary); }
.btn-icon.delete:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: var(--danger); }
.btn-icon.edit:hover { background: rgba(0, 210, 255, 0.1); color: var(--accent-secondary); border-color: var(--accent-secondary); }

/* Combobox Refinement */
.tag-combobox {
    position: relative;
    min-width: 160px;
}

.combobox-selected {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.combobox-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.combobox-dropdown.active { display: flex; }

.combobox-item {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.combobox-item:hover { background: var(--surface-hover); }

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.modal.active { display: flex; }

.modal-content {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

#editForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#editIdeaInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

#editIdeaInput:focus { border-color: var(--accent-secondary); }

.edit-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#editTagInput, #editCategoryInput, #editPriorityInput {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

#editPriorityInput {
    grid-column: span 2;
    cursor: pointer;
}

#editPriorityInput option {
    background: #111827;
}

.save-btn {
    background: white;
    color: #111827;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.save-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.1);
}

.save-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Profile Modal Sidebar Tabs */
.prof-tab {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #666;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1.4;
}
.prof-tab:hover { background: rgba(255,255,255,0.05); color: #ccc; }
.prof-tab.active { background: rgba(99,102,241,0.15); color: #a5b4fc; font-weight: 600; }
.prof-panel { display: none; }
.prof-panel.active { display: block; }
