.rs-panel {
    position: fixed; top: var(--ph-header-height, 48px); right: 0; bottom: 12px;
    width: 0; background: #fff;
    border-left: 1px solid transparent;
    border-radius: 10px 0 0 10px;
    display: flex; flex-direction: column;
    z-index: 40; overflow: hidden;
    transition: width .15s ease;
}
.rs-panel.rs-mode-icon { width: 64px; border-left: 1px solid #eee; box-shadow: -2px 0 8px rgba(0,0,0,.04); }
.rs-panel.rs-mode-full { width: var(--rs-width, 320px); border-left: 1px solid #ddd; box-shadow: -4px 0 16px rgba(0,0,0,.06); }
.rs-panel.rs-resizing { transition: none; }

.rs-resize-handle {
    position: absolute; top: 0; left: 0; bottom: 0; width: 6px;
    cursor: ew-resize;
}
.rs-resize-handle:hover { background: rgba(0,0,0,.08); }
.rs-panel.rs-mode-icon .rs-resize-handle,
.rs-panel.rs-mode-hidden .rs-resize-handle { display: none; }

.rs-panel-head { flex: none; padding: 10px 12px 6px; border-bottom: 1px solid #eee; }
.rs-panel-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.rs-search {
    display: flex; align-items: center; gap: 6px;
    background: #f2f3f5; border-radius: 8px; padding: 6px 8px; margin-bottom: 8px;
}
.rs-search input { border: none; background: none; outline: none; font: inherit; width: 100%; }
.rs-search svg { width: 15px; height: 15px; flex: none; color: #888; }
.rs-filter-tabs { display: flex; gap: 6px; }
.rs-filter-tab {
    border: 1px solid #ddd; background: #fff; border-radius: 14px;
    padding: 3px 10px; font-size: 11.5px; cursor: pointer; color: #666;
}
.rs-filter-tab.active { background: #1565c0; color: #fff; border-color: #1565c0; }

.rs-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; }
.rs-panel.rs-mode-icon .rs-list { padding: 12px 0 6px; }

.rs-card {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 8px; margin-bottom: 4px; border-radius: 8px;
    cursor: pointer; position: relative;
}
.rs-card:hover { background: #f2f3f5; }
.rs-card.rs-dragging { opacity: .4; }
.rs-card.rs-drop-before { border-top: 2px solid #1565c0; }
.rs-card.rs-drop-after { border-bottom: 2px solid #1565c0; }

.rs-card-icon {
    flex: none; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; position: relative;
}
.rs-card-icon svg { width: 16px; height: 16px; }
.rs-urgent-dot {
    position: absolute; top: -2px; right: -2px; width: 9px; height: 9px;
    border-radius: 50%; background: #c62828; border: 2px solid #fff;
}
.rs-card-body { flex: 1 1 auto; min-width: 0; }
.rs-card-top { display: flex; justify-content: space-between; gap: 6px; }
.rs-card-dept { font-size: 11.5px; font-weight: 700; color: #555; }
.rs-card-time { font-size: 10.5px; color: #999; flex: none; }
.rs-card-title { font-size: 12.5px; font-weight: 600; color: #222; margin-top: 1px; }
.rs-card-preview {
    font-size: 12px; color: #777; margin-top: 2px;
    white-space: nowrap; overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 10px), transparent 100%);
}
.rs-unread-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #1565c0; margin-top: 4px; }
.rs-drag-handle { flex: none; cursor: grab; color: #ccc; align-self: center; }
.rs-drag-handle svg { width: 12px; height: 12px; }

.rs-icon-item {
    width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer; position: relative;
}
.rs-icon-item svg { width: 18px; height: 18px; }

.rs-empty-note { color: #999; font-size: 12.5px; text-align: center; padding: 20px 8px; }

.rs-new-btn-wrap { flex: none; padding: 8px; border-top: 1px solid #eee; }
.rs-new-btn {
    width: 100%; border: 1px dashed #ccc; background: #fff; border-radius: 8px;
    padding: 8px; font-size: 12.5px; color: #555; cursor: pointer;
}
.rs-new-btn:hover { background: #f5f5f5; }

.rs-hover-popup {
    position: fixed; z-index: 250; width: 230px;
    background: #fff; border: 1px solid #ccc; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 10px 12px;
    pointer-events: none;
}
.rs-hover-popup-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.rs-hover-popup-text { font-size: 12px; color: #555; }
.rs-hover-popup-time { font-size: 10.5px; color: #999; margin-top: 4px; }

.rs-chat-head {
    flex: none; display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid #eee;
}
.rs-back-btn {
    border: none; background: none; cursor: pointer; color: #555;
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; flex: none;
}
.rs-back-btn:hover { background: #f0f0f0; }
.rs-chat-title { font-weight: 700; font-size: 13.5px; }
.rs-chat-context { font-size: 11px; color: #888; }

.rs-chat-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.rs-msg { max-width: 85%; }
.rs-msg.self { align-self: flex-end; }
.rs-msg-meta { font-size: 10.5px; color: #999; margin-bottom: 2px; display: flex; gap: 6px; }
.rs-msg.self .rs-msg-meta { justify-content: flex-end; }
.rs-msg-bubble { background: #f2f3f5; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; color: #222; }
.rs-msg.self .rs-msg-bubble { background: #1565c0; color: #fff; }

.rs-context-card {
    border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fafafa;
}
.rs-context-card svg { width: 13px; height: 13px; vertical-align: -2px; }
.rs-context-card button {
    border: 1px solid #1565c0; color: #1565c0; background: #fff; border-radius: 6px;
    padding: 3px 8px; font-size: 11.5px; cursor: pointer;
}
.rs-context-card button:hover { background: #e3f2fd; }

.rs-chat-input-row { flex: none; display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid #eee; }
.rs-chat-input-row input {
    flex: 1 1 auto; border: 1px solid #ddd; border-radius: 18px; padding: 8px 12px; font: inherit; outline: none;
}
.rs-chat-send-btn {
    flex: none; width: 34px; height: 34px; border-radius: 50%; border: none;
    background: #1565c0; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rs-chat-send-btn:hover { background: #0d47a1; }
.rs-chat-send-btn svg { width: 16px; height: 16px; }

@media (max-width: 700px) {
    .rs-panel.rs-mode-full { width: min(88vw, 340px) !important; }
}