/* Sidebar Panel Styles - VSCode Inspired */

.sidebar-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--n360-color-background);
    overflow-y: auto;
    overflow-x: hidden;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--n360-color-border);
    background: var(--n360-color-background-elevated);
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--n360-color-text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-content {
    flex: 1;
    padding: 0.5rem;
}

.panel-section {
    margin-bottom: 1.5rem;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.section-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--n360-color-text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Patient List */
.patient-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.patient-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.patient-item:hover {
    background: var(--n360-color-background-hover);
    border-color: var(--n360-color-border);
}

.patient-item:active {
    background: var(--n360-color-background-active);
}

.patient-avatar {
    flex-shrink: 0;
}

.patient-info {
    flex: 1;
    min-width: 0;
}

.patient-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--n360-color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patient-mrn {
    font-size: 0.75rem;
    color: var(--n360-color-text-secondary);
    margin-top: 0.125rem;
}

.patient-meta {
    font-size: 0.7rem;
    color: var(--n360-color-text-tertiary);
    margin-top: 0.125rem;
}

.patient-status {
    flex-shrink: 0;
}

/* Favorites */
.patient-list.favorites .patient-item {
    padding: 0.625rem;
}

.patient-list.favorites .patient-avatar {
    width: 28px;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--n360-color-text-tertiary);
}

.empty-state p {
    font-size: 0.875rem;
    margin: 0.5rem 0 0;
}

.empty-state-small {
    padding: 1rem;
    text-align: center;
}

.empty-state-small p {
    font-size: 0.8rem;
    color: var(--n360-color-text-tertiary);
    margin: 0;
}

/* Quick Links */
.quick-links {
    border-top: 1px solid var(--n360-color-border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--n360-color-background-elevated);
    border: 1px solid var(--n360-color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    border-color: var(--n360-color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--n360-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--n360-color-text-primary);
    line-height: 1;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.kpi-trend.positive {
    color: var(--n360-color-success);
}

.kpi-trend.negative {
    color: var(--n360-color-danger);
}

.kpi-trend.neutral {
    color: var(--n360-color-text-secondary);
}

.kpi-progress {
    margin-top: 0.375rem;
}

/* Target List */
.target-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.target-item {
    padding: 0.75rem;
    background: var(--n360-color-background-elevated);
    border: 1px solid var(--n360-color-border);
    border-radius: 6px;
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.target-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--n360-color-text-primary);
}

.target-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--n360-color-text-secondary);
}

/* Insights List */
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--n360-color-background-elevated);
    border: 1px solid var(--n360-color-border);
    border-left: 3px solid;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.insight-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.insight-item.priority-high {
    border-left-color: var(--n360-color-danger);
}

.insight-item.priority-medium {
    border-left-color: var(--n360-color-warning);
}

.insight-item.priority-low {
    border-left-color: var(--n360-color-success);
}

.insight-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.insight-content {
    flex: 1;
    min-width: 0;
}

.insight-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--n360-color-text-primary);
    margin-bottom: 0.25rem;
}

.insight-description {
    font-size: 0.7rem;
    color: var(--n360-color-text-secondary);
    line-height: 1.4;
}

/* Patient Search Input */
.patient-search-input {
    margin-bottom: 0.5rem;
}

/* Scrollbar Styling */
.sidebar-panel::-webkit-scrollbar {
    width: 8px;
}

.sidebar-panel::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: var(--n360-color-border);
    border-radius: 4px;
}

.sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: var(--n360-color-text-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .panel-header {
        padding: 0.75rem;
    }

    .panel-content {
        padding: 0.375rem;
    }

    .kpi-grid {
        gap: 0.5rem;
    }

    .kpi-card {
        padding: 0.75rem;
    }

    .kpi-value {
        font-size: 1.125rem;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .sidebar-panel {
        background: #1e1e1e;
    }

    .panel-header {
        background: #252526;
        border-bottom-color: #3e3e42;
    }

    .kpi-card,
    .target-item,
    .insight-item {
        background: #252526;
        border-color: #3e3e42;
    }

    .patient-item:hover {
        background: #2a2d2e;
        border-color: #3e3e42;
    }
}
