/* ===== MEDICAL ANALYSES LIST PAGE STYLES ===== */

/* ===== HEADER STYLES ===== */
.analyses-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

/* ===== PAGE CONTENT ===== */
.analyses-content {
    padding: 1.5rem 2rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 180px;
    flex: 1;
}

.filter-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-input,
.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-white);
    transition: var(--transition);
    width: 100%;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* ===== TABLE CARD ===== */
.analyses-table-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.analyses-table {
    width: 100%;
    border-collapse: collapse;
}

.analyses-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.analyses-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.analyses-table tbody tr {
    transition: var(--transition);
}

.analyses-table tbody tr:hover {
    background: var(--bg-secondary);
}

.analyses-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.available {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.unavailable {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.complex {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.status-badge.simple {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-action.btn-edit {
    background: #374151;
    color: white;
}

.btn-action.btn-edit:hover {
    background: #1f2937;
}

.btn-action.btn-manage {
    background: #374151;
    color: white;
}

.btn-action.btn-manage:hover {
    background: #1f2937;
}

.btn-action.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-action.btn-delete:hover {
    background: #dc2626;
}

/* ===== MODAL FORM STYLES ===== */
.analysis-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== CHECKBOX GROUP ===== */
.form-row-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

/* ===== SEARCHABLE DROPDOWN ===== */
.searchable-dropdown {
    position: relative;
}

.searchable-dropdown input[type="text"] {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-white);
    transition: var(--transition);
}

.searchable-dropdown input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.dropdown-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.75rem;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    margin-top: 2px;
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.dropdown-option:hover {
    background: var(--bg-secondary);
}

.dropdown-option.selected {
    background: rgba(8, 145, 178, 0.1);
    color: var(--primary);
}

.dropdown-option.no-results {
    padding: 0.75rem 0.875rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: default;
}

.dropdown-option.no-results:hover {
    background: transparent;
}

/* ===== MODAL SIZE MODIFIERS ===== */
.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 800px;
}

/* ===== SIDE PANEL ===== */
.side-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

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

.side-panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.side-panel-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--bg-white);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.side-panel.active .side-panel-content {
    transform: translateX(0);
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.side-panel-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.side-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* ===== EXPORT FILTERS ===== */
.export-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.export-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    text-align: center;
}

.export-preview p {
    margin: 0;
    color: var(--text-secondary);
}

.export-preview span {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
}

/* ===== BUTTON VARIANTS ===== */
.btn-success {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

/* ===== USER AVATAR ===== */
.user-avatar.analyst {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-secondary);
}

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

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* ===== TEXT MUTED ===== */
.text-muted {
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .analyses-content {
        padding: 1rem;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-item {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .analyses-table {
        font-size: 0.8125rem;
    }

    .analyses-table th,
    .analyses-table td {
        padding: 0.75rem 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .side-panel-content {
        width: 100%;
        max-width: 100vw;
    }

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

    .form-row-checkboxes {
        flex-direction: column;
        gap: 0.75rem;
    }
}
