/* ============================================
   Research Module v2.0 - Professional Table Design
   Inspired by Institutional Research Platforms
   ============================================ */

.research-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    overflow: hidden;
}

/* Header */
.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.research-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.research-main-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.research-main-title i {
    color: #F39C12;
    font-size: 16px;
}

/* Filters Bar */
.research-filters {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: center;
}

.search-wrapper {
    flex: 1;
    position: relative;
    max-width: 350px;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 12px;
}

.search-wrapper input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.search-wrapper input::placeholder {
    color: #555;
}

.search-wrapper input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.research-filters select {
    padding: 8px 28px 8px 12px;
    background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    min-width: 120px;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: all 0.2s;
}

.research-filters select:hover,
.research-filters select:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Table */
.research-table-wrapper {
    flex: 1;
    overflow: auto;
    background: #000000;
}

.research-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.research-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.research-table th {
    background: #000000;
    color: #666;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    user-select: none;
}

.research-table th.sortable {
    cursor: pointer;
    transition: color 0.2s;
}

.research-table th.sortable:hover {
    color: #00bcd4;
}

.research-table th i {
    margin-left: 4px;
    font-size: 9px;
    opacity: 0.5;
}

/* Table Rows */
.research-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.research-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.research-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.research-table td {
    padding: 10px 12px;
    color: #C0C4CF;
    vertical-align: middle;
}

/* Favorite Cell */
.fav-cell {
    width: 36px;
    text-align: center;
}

.fav-btn {
    background: none;
    border: none;
    color: #444;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
}

.fav-btn:hover,
.fav-btn.active {
    color: #ffcc00;
}

.fav-btn.active i {
    color: #ffcc00;
}

/* Date Cell */
.date-cell {
    width: 90px;
    white-space: nowrap;
    color: #888;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

/* Type Cell */
.type-cell {
    width: 50px;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
}

.file-type-badge.pdf {
    background: #ff0000;
    color: #fff;
}

.file-type-badge.excel {
    background: #28a745;
    color: #fff;
}

.file-type-badge.word {
    background: #2b579a;
    color: #fff;
}

/* Title Cell */
.title-cell {
    max-width: 280px;
}

.report-title {
    color: #fff;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-size: 12px;
}

/* Institute Cell */
.institute-cell {
    color: #00bcd4 !important;
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
    font-size: 12px;
}

/* Tags Cell */
.tags-cell {
    max-width: 450px;
}

.tags-inline {
    display: inline;
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

.tags-inline .tag-item {
    cursor: pointer;
    transition: color 0.15s;
}

.tags-inline .tag-item:hover {
    color: #00bcd4;
}

.tags-inline .tag-separator {
    color: #444;
    margin: 0 4px;
}

/* Action Cell */
.action-cell {
    width: 40px;
    text-align: right;
}

.action-btn {
    background: none;
    border: none;
    color: #00bcd4;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(0, 188, 212, 0.15);
    transform: translateX(2px);
}

/* Footer */
.research-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: #666;
}

.research-count {
    font-family: 'JetBrains Mono', monospace;
}

.research-count span {
    color: #00bcd4;
    font-weight: 600;
}

.research-update {
    display: flex;
    align-items: center;
    gap: 6px;
}

.research-update i {
    color: #F39C12;
}

/* Responsive */
@media (max-width: 1400px) {
    .tags-cell {
        max-width: 300px;
    }
    
    .title-cell {
        max-width: 250px;
    }
}

@media (max-width: 1200px) {
    .research-filters {
        flex-wrap: wrap;
    }
    
    .search-wrapper {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .institute-cell {
        display: none;
    }
    
    .tags-cell {
        display: none;
    }
}
