/* ===== RESEARCH / SHCM STYLES ===== */

/* Stats */
.rsch-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.rsch-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s;
}
.rsch-stat-card:hover { transform: translateY(-2px); }
.rsch-stat-val { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.rsch-stat-lbl { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.rsch-done .rsch-stat-val { color: #16a34a; }
.rsch-pending .rsch-stat-val { color: #ea580c; }
.rsch-reg .rsch-stat-val { color: #7c3aed; }

/* Settings */
.rsch-settings-card { padding: 12px 20px !important; margin-bottom: 16px; }
.rsch-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rsch-settings-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.rsch-settings-unit { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.rsch-time-input { width: 110px !important; }
.rsch-dur-input { width: 72px !important; text-align: center; }

/* Table */
.rsch-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}
.rsch-table-header h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.rsch-table-wrap { overflow-x: auto; }
.rsch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.rsch-table thead th {
    background: var(--bg-secondary);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}
.rsch-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.rsch-table tbody tr:hover { background: var(--bg-hover); }
.rsch-table td { padding: 10px 12px; vertical-align: middle; }
.rsch-stt { text-align: center; font-weight: 700; color: var(--text-muted); }
.rsch-doctor { font-weight: 600; color: var(--text); white-space: nowrap; }
.rsch-title { color: var(--text-secondary); line-height: 1.4; }
.rsch-date { text-align: center; font-weight: 600; color: var(--text); font-size: 0.88rem; }

.rsch-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.rsch-actions { display: flex; gap: 2px; }
.rsch-actions .btn-icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: background 0.15s;
}
.rsch-actions .btn-icon:hover { background: var(--bg-hover); }

/* Row status highlight */
.rsch-row-done td:first-child { border-left: 3px solid #16a34a; }
.rsch-row-pending td:first-child { border-left: 3px solid #ea580c; }
.rsch-row-registered td:first-child { border-left: 3px solid #7c3aed; }

/* Files section */
.rsch-files-card { margin-top: 16px; }
.rsch-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.rsch-files-header h3 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.rsch-files-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}
.rsch-files-list { display: flex; flex-direction: column; gap: 8px; }
.rsch-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rsch-file-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}
.rsch-file-icon { font-size: 1.5rem; flex-shrink: 0; }
.rsch-file-info { flex: 1; min-width: 0; }
.rsch-file-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rsch-file-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.rsch-file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Responsive */
@media (max-width: 768px) {
    .rsch-stats { grid-template-columns: repeat(2, 1fr); }
    .rsch-settings-row { flex-direction: column; align-items: flex-start; }
    .rsch-table { font-size: 0.78rem; }
    .rsch-table td, .rsch-table th { padding: 8px 6px; }
    .rsch-file-name { max-width: 180px; }
}
