/* ==================== */
/* Conference Room       */
/* ==================== */

.cc-container {
    display: flex;
    height: calc(100% - 16px);
    margin: 0 20px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

/* -- Left sidebar (agent list) -- */
.cc-sidebar {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: 14px 8px;
    background: var(--color-bg);
    overflow: hidden;
    transition: width 0.25s ease, min-width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}

.cc-sidebar.cc-collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    border-right: none;
}

.cc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.cc-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    font-family: inherit;
    transition: background 0.15s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.cc-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cc-sidebar-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

/* Agent/conversation list */
.cc-agent-list,
.cc-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Collapsible section headers */
.cc-section-header {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 12px 12px 6px 12px;
    cursor: pointer;
    user-select: none;
}

.cc-section-toggle {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    padding: 0;
    flex-shrink: 0;
    pointer-events: none;
}

.cc-toggle-arrow {
    transition: transform 0.2s ease;
}

.cc-section-toggle.collapsed .cc-toggle-arrow {
    transform: rotate(-90deg);
}

.cc-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-faint);
    flex: 1;
}

/* Agent (DM) items */
.cc-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    border-radius: 20px;
    margin: 0 4px;
}

.cc-agent-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cc-agent-item.active {
    background: var(--color-primary-bg);
}

.cc-agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.cc-agent-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cc-agent-avatar svg {
    width: 16px;
    height: 16px;
}

/* Green "live" indicator dot */
.cc-live-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--color-bg);
    z-index: 2;
}

.cc-agent-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.cc-agent-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cc-empty-list,
.cc-empty-section {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* Context Menu */
.cc-context-menu {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--color-border);
    padding: 4px 0;
    min-width: 200px;
    animation: ccMenuFadeIn 0.12s ease-out;
}

@keyframes ccMenuFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.cc-context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.cc-context-menu-item:hover {
    background: var(--color-bg-muted);
}

.cc-context-menu-danger {
    color: var(--color-error, #ef4444);
}

.cc-context-menu-danger:hover {
    background: rgba(239, 68, 68, 0.08);
}

.cc-context-menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-context-menu-sub {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-text-faint);
}

.cc-context-menu-divider {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}

/* -- Right panel (thread / conversation) -- */
.cc-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cc-thread-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    color: var(--color-text-muted);
}

.cc-thread-empty p {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cc-thread-empty span {
    font-size: 14px;
    opacity: 0.6;
}

.cc-thread-active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cc-thread-active.hidden {
    display: none;
}

/* Thread header */
.cc-thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    flex-shrink: 0;
}

.cc-back-btn {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.cc-thread-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

img.cc-thread-avatar {
    object-fit: cover;
}

.cc-thread-avatar svg {
    width: 18px;
    height: 18px;
}

.cc-thread-avatar-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.cc-thread-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cc-thread-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.cc-thread-status {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ---- Conference Room Messages ---- */

.cc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 32px 24px;
    display: flex;
    flex-direction: column;
}

.cc-msg {
    max-width: 680px;
    width: 100%;
    margin: 0 auto 16px;
    animation: ccMsgSlide 0.3s ease-out;
}

@keyframes ccMsgSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* User messages — right-aligned bubble */
.cc-msg-user {
    display: flex;
    justify-content: flex-end;
}

.cc-msg-user .cc-msg-content {
    background: var(--color-bg-secondary, #e3e5e8);
    padding: 10px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 15px;
    color: var(--color-text);
    max-width: 75%;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

/* Agent messages — avatar + name + content */
.cc-msg-agent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cc-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
}

.cc-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cc-msg-avatar svg {
    width: 16px;
    height: 16px;
}

.cc-icon-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
}

.cc-icon-avatar svg {
    width: 54%;
    height: 54%;
    stroke: #4f46e5;
}

.cc-icon-avatar-letter {
    font-weight: 700;
    font-size: 70%;
    line-height: 1;
    color: #4f46e5;
}

.cc-msg-body {
    flex: 1;
    min-width: 0;
}

.cc-msg-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.cc-msg-agent .cc-msg-content {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-text);
}

/* Markdown formatting inside agent messages */
.cc-msg-agent .cc-msg-content p {
    margin-bottom: 14px;
}

.cc-msg-agent .cc-msg-content p:last-child {
    margin-bottom: 0;
}

.cc-msg-agent .cc-msg-content code {
    background: rgba(0, 0, 0, 0.07);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
}

.cc-msg-agent .cc-msg-content pre {
    background: #2b2b2b;
    color: #e0ddd5;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
    white-space: pre;
}

.cc-msg-agent .cc-msg-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.cc-msg-agent .cc-msg-content ul,
.cc-msg-agent .cc-msg-content ol {
    padding-left: 20px;
    margin-bottom: 14px;
}

.cc-msg-agent .cc-msg-content li {
    margin-bottom: 4px;
}

.cc-msg-agent .cc-msg-content strong {
    font-weight: 600;
    color: var(--color-text);
}

.cc-msg-agent .cc-msg-content em {
    font-style: italic;
}

.cc-msg-agent .cc-msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.cc-msg-agent .cc-msg-content th,
.cc-msg-agent .cc-msg-content td {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.cc-msg-agent .cc-msg-content th {
    background: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

/* Typing indicator inside control center */
.cc-msg .claude-typing-indicator {
    padding: 4px 0;
}

/* ---- Tool call indicators ---- */

.cc-tool-calls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.cc-tool-call {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg-secondary, rgba(0, 0, 0, 0.03));
    border-radius: 10px;
    font-size: 13px;
    color: var(--color-text-secondary, #64748b);
    border: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
    animation: ccMsgSlide 0.25s ease-out;
}

.cc-tool-call svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-primary, #4f46e5);
}

.cc-tool-call-label {
    flex: 1;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.cc-tool-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border, rgba(0, 0, 0, 0.1));
    border-top-color: var(--color-primary, #4f46e5);
    border-radius: 50%;
    animation: ccToolSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes ccToolSpin {
    to { transform: rotate(360deg); }
}

.cc-tool-done .cc-tool-spinner {
    display: none;
}

.cc-tool-check {
    display: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-success, #22c55e);
}

.cc-tool-done .cc-tool-check {
    display: block;
}

.cc-tool-error .cc-tool-spinner {
    display: none;
}

.cc-tool-error .cc-tool-check {
    display: none;
}

.cc-tool-error::after {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-danger, #ef4444);
    color: white;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Compose bar ---- */

.cc-compose {
    padding: 0 40px 16px;
    background: transparent;
    flex-shrink: 0;
}

.cc-compose-wrapper {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    border-radius: 24px;
    padding: 14px 18px 10px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-compose-wrapper:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cc-file-preview {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 8px;
}

.cc-compose-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 0 8px 0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    color: var(--color-text);
    resize: none;
    max-height: 200px;
    line-height: 1.5;
}

.cc-compose-input::placeholder {
    color: #6b6b6b;
}

.cc-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-attach-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    transition: all 0.15s ease;
}

.cc-attach-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.cc-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-send-btn:hover:not(:disabled) {
    background: #333333;
    transform: scale(1.05);
}

.cc-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.cc-send-btn:disabled {
    background: #c5c8cc;
    cursor: not-allowed;
    color: #ffffff;
}

.cc-send-btn.cc-stop-mode {
    background: #dc3545;
    color: #ffffff;
}

.cc-send-btn.cc-stop-mode:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* ---- @mention dropdown ---- */

.cc-mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 680px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 6px;
    margin-bottom: 8px;
    z-index: 10;
}

.cc-mention-dropdown.hidden {
    display: none;
}

.cc-mention-item {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.12s;
}

.cc-mention-item:hover,
.cc-mention-item.active {
    background: rgba(79, 70, 229, 0.06);
    color: var(--color-primary);
}

/* ---- Presence strip ---- */

.cc-presence-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px 54px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.cc-presence-name {
    position: relative;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.1px;
}

.cc-presence-name:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}

.cc-presence-name.pinged {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.2);
}

.cc-presence-name.cc-presence-active {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

/* ---- Date separator ---- */

.cc-date-sep {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-faint);
    padding: 12px 0;
    position: relative;
}

.cc-date-sep::before,
.cc-date-sep::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--color-border);
}

.cc-date-sep::before { left: 0; }
.cc-date-sep::after  { right: 0; }

/* ---- Empty state ---- */

.cc-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cc-empty-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.4;
    letter-spacing: -0.3px;
}

.cc-empty-hint {
    font-size: 14px;
    color: var(--color-text-muted);
    opacity: 0.5;
}

/* ---- Input area (alternative layout) ---- */

.cc-input-area {
    position: relative;
    padding: 0 24px 16px;
    display: flex;
    justify-content: center;
}

.cc-input-wrapper {
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    border-radius: 24px;
    padding: 14px 18px 10px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-input-wrapper:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cc-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 0 8px 0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    color: var(--color-text);
    resize: none;
    max-height: 200px;
    line-height: 1.5;
}

.cc-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.cc-input::placeholder {
    color: #6b6b6b;
}

/* -- Section body (collapsible wrapper) -- */
.cc-section-body {
    display: flex;
    flex-direction: column;
}

/* -- User message bubble & time -- */
.cc-msg-bubble {
    background: var(--color-bg-secondary, #e3e5e8);
    padding: 10px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 15px;
    color: var(--color-text);
    max-width: 75%;
    line-height: 1.5;
    word-break: break-word;
}

.cc-msg-time {
    font-size: 11px;
    color: var(--color-text-faint);
    margin-top: 2px;
    padding-right: 4px;
    text-align: right;
}

.cc-msg-agent .cc-msg-time {
    text-align: left;
    padding-left: 48px;
}

/* -- Group items in sidebar -- */
.cc-group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 20px;
    margin: 0 4px;
}

.cc-group-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cc-group-item.active {
    background: var(--color-primary-bg);
}

/* Stacked avatar cluster for groups */
.cc-group-avatar {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.cc-group-avatar-item {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    border: 1.5px solid var(--color-bg);
}

.cc-group-avatar-item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cc-group-avatar-item:nth-child(1) { top: 0; left: 0; z-index: 3; }
.cc-group-avatar-item:nth-child(2) { top: 1px; left: 9px; z-index: 2; }
.cc-group-avatar-item:nth-child(3) { top: 10px; left: 3px; z-index: 1; }

/* Group text: name + members */
.cc-group-text {
    min-width: 0;
    flex: 1;
}

.cc-group-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
}

.cc-group-members {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.3;
    margin-top: 2px;
}

/* -- Group picker modal -- */
.cc-group-picker {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-group-picker.hidden {
    display: none;
}

.cc-group-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.cc-group-picker-panel {
    position: relative;
    background: var(--color-card-bg, #fff);
    border-radius: 16px;
    width: 360px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.cc-group-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--color-border);
}

.cc-group-picker-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.cc-group-picker-header button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    padding: 4px;
    border-radius: 6px;
}

.cc-group-picker-header button:hover {
    background: var(--color-surface-hover);
}

.cc-group-picker-name-wrap {
    padding: 12px 20px 8px;
}

.cc-group-picker-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
}

.cc-group-picker-name-input:focus {
    border-color: var(--color-primary, #6366f1);
}

.cc-group-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 20px 8px;
    min-height: 0;
}

.cc-group-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.cc-group-picker-chip button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
}

.cc-group-picker-chip button:hover {
    color: #fff;
}

.cc-group-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.cc-group-picker-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cc-group-picker-agent:hover {
    background: var(--color-surface-hover);
}

.cc-group-picker-agent span {
    flex: 1;
    font-size: 14px;
    color: var(--color-text);
}

.cc-group-picker-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.cc-group-picker-agent.selected .cc-group-picker-check {
    background: var(--color-primary, #6366f1);
    border-color: var(--color-primary, #6366f1);
    position: relative;
}

.cc-group-picker-agent.selected .cc-group-picker-check::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cc-group-picker-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

.cc-group-picker-footer.hidden {
    display: none;
}

.cc-group-picker-create-btn {
    padding: 8px 20px;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cc-group-picker-create-btn:hover {
    background: var(--color-primary-hover, #4f46e5);
}

/* ---- Mobile responsive ---- */
@media (max-width: 768px) {
    .cc-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .cc-thread {
        position: absolute;
        inset: 0;
        background: var(--color-bg);
        z-index: 5;
        display: none;
    }

    .cc-thread.cc-thread-visible {
        display: flex;
    }

    .cc-back-btn {
        display: flex;
    }

    .cc-container {
        position: relative;
    }
}

/* ---- Info Panel (Agent Profile / Board Info) ---- */

.cc-info-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    background: var(--color-bg, #ffffff);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 40;
    display: flex;
    flex-direction: column;
    animation: ccInfoSlideIn 0.3s ease-out;
    overflow: hidden;
}

.cc-info-panel.hidden {
    display: none;
}

@keyframes ccInfoSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.cc-info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.cc-info-panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.cc-info-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.cc-info-panel-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text);
}

.cc-info-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Header info button */
.cc-header-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-faint);
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.cc-header-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

/* Clickable thread name */
.cc-thread-name.cc-thread-name-clickable {
    cursor: pointer;
    transition: color 0.15s ease;
}

.cc-thread-name.cc-thread-name-clickable:hover {
    color: var(--color-primary);
}

/* --- Agent Profile content --- */

.cc-profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.cc-profile-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
}

.cc-profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-profile-agent-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
}

.cc-profile-agent-role {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.4;
}

.cc-profile-section {
    margin-bottom: 20px;
}

.cc-profile-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-faint);
    margin-bottom: 8px;
}

.cc-profile-section-content {
    font-size: 13px;
    line-height: 1.55;
    color: var(--color-text);
}

.cc-profile-section-content p {
    margin: 0 0 4px;
}

.cc-profile-section-content.empty {
    color: var(--color-text-faint);
    font-style: italic;
}

.cc-profile-training-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cc-profile-training-entry:last-child {
    border-bottom: none;
}

.cc-profile-training-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
}

.cc-profile-training-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    margin-top: 2px;
}

.cc-profile-training-date {
    font-size: 11px;
    color: var(--color-text-faint);
    margin-top: 2px;
}

.cc-profile-edit-link {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.cc-profile-edit-link:hover {
    background: rgba(79, 70, 229, 0.06);
}

/* --- Board Info content --- */

.cc-board-purpose {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cc-board-speaking-order {
    margin-bottom: 20px;
}

.cc-board-order-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.cc-board-order-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cc-board-order-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.cc-board-order-role {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-left: auto;
}

.cc-board-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.cc-board-member-card:hover {
    background: rgba(0, 0, 0, 0.03);
}

.cc-board-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.cc-board-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-board-member-info {
    flex: 1;
    min-width: 0;
}

.cc-board-member-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.cc-board-member-role {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-board-rules-section {
    margin-bottom: 20px;
}

.cc-board-rules-content {
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-text-muted);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Info panel mobile */
@media (max-width: 640px) {
    .cc-info-panel {
        width: 100%;
    }
}

