*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --background: #0a0a0a;
    --background-card: #111111;
    --background-hover: #1a1a1a;
    --foreground: #ffffff;
    --foreground-muted: #8a8a8a;
    --primary: #00ffc8;
    --primary-hover: #00e6b5;
    --primary-glow: rgba(0, 255, 200, 0.3);
    --secondary: #00d4aa;
    --border: #1a1a1a;
    --border-focus: #00ffc8;
    --error: #ff4757;
    --success: #25ba3b;
    --warning: #ffa502;
    --sidebar-bg: #0d0d0d;
    --agent-manager: #00ffc8;
    --agent-admin: #3b82f6;
    --agent-sales: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--foreground);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.hidden { display: none !important; }

.app-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
}

/* ─── OPC SIDEBAR ─── */
.opc-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
}

.opc-sidebar.sidebar-collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
    padding: 0;
}

.opc-sidebar-logo {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.opc-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #000;
}

.opc-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.opc-logo-text span {
    color: var(--primary);
}

.opc-sidebar-user {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.opc-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.opc-user-role {
    font-size: 0.75rem;
    color: var(--primary);
}

.opc-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.opc-nav-section {
    padding: 0.5rem 1.5rem 0.25rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--foreground-muted);
    font-weight: 600;
}

.opc-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--foreground-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    text-decoration: none;
}

.opc-nav-item:hover {
    background: var(--background-hover);
    color: var(--foreground);
}

.opc-nav-item.active {
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
    border-left-color: var(--primary);
}

.opc-nav-item.disabled {
    color: var(--foreground-muted);
    opacity: 0.4;
    cursor: not-allowed;
    border-left-color: transparent;
}

.opc-nav-item.disabled:hover {
    background: transparent;
    color: var(--foreground-muted);
}

.opc-nav-item .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.opc-nav-item .badge {
    margin-left: auto;
    background: rgba(0, 255, 200, 0.15);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.opc-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.opc-lang-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}

.opc-lang-select:focus {
}

.opc-back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    color: var(--foreground-muted);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.opc-back-link:hover {
    color: var(--foreground);
}

/* ─── MAIN CHAT AREA ─── */
.opc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    min-width: 0;
}

.opc-chat-header {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--sidebar-bg);
    flex-shrink: 0;
}

.opc-agent-tabs {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.opc-agent-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    color: var(--foreground-muted);
    background: transparent;
    font-family: inherit;
}

.opc-agent-tab:hover {
    background: var(--background-hover);
    color: var(--foreground);
}

.opc-agent-tab.active {
    background: var(--background-hover);
    border-color: var(--border);
    color: var(--foreground);
}

.opc-agent-tab[data-agent="manager"].active {
    border-color: var(--agent-manager);
    color: var(--agent-manager);
}

.opc-agent-tab[data-agent="administrator"].active {
    border-color: var(--agent-admin);
    color: var(--agent-admin);
}

.opc-agent-tab[data-agent="sales"].active {
    border-color: var(--agent-sales);
    color: var(--agent-sales);
}

.opc-agent-tab .tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.opc-agent-tab[data-agent="manager"] .tab-dot { background: var(--agent-manager); }
.opc-agent-tab[data-agent="administrator"] .tab-dot { background: var(--agent-admin); }
.opc-agent-tab[data-agent="sales"] .tab-dot { background: var(--agent-sales); }

.opc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opc-header-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.opc-header-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.opc-mobile-toggle {
    display: flex;
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.opc-mobile-toggle:hover {
    color: var(--primary);
}

/* ─── CHAT MESSAGES ─── */
.opc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.opc-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.opc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.opc-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.opc-msg {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: msg-in 0.3s ease-out;
}

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

.opc-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.opc-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #000;
}

.opc-msg.agent .opc-msg-avatar { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.opc-msg.agent[data-agent="administrator"] .opc-msg-avatar { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.opc-msg.agent[data-agent="sales"] .opc-msg-avatar { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.opc-msg.user .opc-msg-avatar { background: var(--background-hover); color: var(--foreground); }

.opc-msg-bubble {
    flex: 1;
    min-width: 0;
}

.opc-msg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.opc-msg-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.opc-msg.agent .opc-msg-name { color: var(--primary); }
.opc-msg.agent[data-agent="administrator"] .opc-msg-name { color: var(--agent-admin); }
.opc-msg.agent[data-agent="sales"] .opc-msg-name { color: var(--agent-sales); }
.opc-msg.user .opc-msg-name { color: var(--foreground-muted); }

.opc-msg-time {
    font-size: 0.65rem;
    color: var(--foreground-muted);
}

.opc-msg-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--foreground);
}

.opc-msg.agent .opc-msg-content {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 4px 12px 12px 12px;
    padding: 0.75rem 1rem;
}

.opc-msg.user .opc-msg-content {
    background: var(--primary);
    color: #000;
    border-radius: 12px 4px 12px 12px;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.opc-msg-content p { margin: 0.25rem 0; }
.opc-msg-content p:first-child { margin-top: 0; }
.opc-msg-content p:last-child { margin-bottom: 0; }
.opc-msg-content ul, .opc-msg-content ol { padding-left: 1.25rem; margin: 0.35rem 0; }
.opc-msg-content li { margin: 0.2rem 0; }
.opc-msg-content strong { font-weight: 600; }
.opc-msg-content code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 255, 200, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
}
.opc-msg-content pre {
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
.opc-msg-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem;
    color: var(--foreground-muted);
    margin: 0.5rem 0;
}
.opc-msg-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.opc-msg-content a:hover {
    color: var(--primary-hover);
}
.opc-msg-content h1 { font-size: 1.25rem; font-weight: 700; margin: 0.75rem 0 0.35rem; color: var(--primary); }
.opc-msg-content h2 { font-size: 1.1rem; font-weight: 700; margin: 0.65rem 0 0.3rem; }
.opc-msg-content h3 { font-size: 1rem; font-weight: 600; margin: 0.5rem 0 0.25rem; }
.opc-msg-content hr { border: none; border-top: 1px solid var(--border); margin: 0.75rem 0; }
.opc-msg-content table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.82rem; }
.opc-msg-content th { background: var(--background-hover); font-weight: 600; text-align: left; padding: 0.4rem 0.6rem; border: 1px solid var(--border); }
.opc-msg-content td { padding: 0.35rem 0.6rem; border: 1px solid var(--border); }
.opc-msg-content tr:nth-child(even) td { background: rgba(0,255,200,0.02); }

/* ─── COMPLEX OUTPUT COMPONENTS ─── */
.opc-output-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.opc-output-card-header {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 255, 200, 0.03);
}

.opc-output-card-body {
    padding: 0.75rem 0.85rem;
}

.opc-stat-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.opc-stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0.5rem;
}

.opc-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.opc-stat-label {
    font-size: 0.7rem;
    color: var(--foreground-muted);
    margin-top: 0.15rem;
}

.opc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.opc-table th {
    text-align: left;
    padding: 0.5rem 0.65rem;
    color: var(--foreground-muted);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.opc-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.opc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.opc-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.35rem;
}

.opc-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.opc-progress-fill.green { background: var(--success); }
.opc-progress-fill.primary { background: var(--primary); }
.opc-progress-fill.blue { background: var(--agent-admin); }
.opc-progress-fill.amber { background: var(--agent-sales); }

.opc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.opc-badge.success { background: rgba(37, 186, 59, 0.15); color: var(--success); }
.opc-badge.warning { background: rgba(255, 165, 2, 0.15); color: var(--warning); }
.opc-badge.error { background: rgba(255, 71, 87, 0.15); color: var(--error); }
.opc-badge.info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.opc-badge.primary { background: rgba(0, 255, 200, 0.15); color: var(--primary); }

.opc-action-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.opc-action-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border);
    background: var(--background-card);
    color: var(--foreground);
    font-family: inherit;
}

.opc-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.opc-action-btn.primary {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.opc-action-btn.primary:hover {
    background: var(--primary-hover);
}

.opc-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.opc-task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.82rem;
}

.opc-task-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.opc-task-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.opc-task-check.done {
    background: var(--success);
    border-color: var(--success);
}

.opc-task-check.done::after {
    content: '✓';
    font-size: 0.6rem;
    color: #fff;
}

.opc-task-text { flex: 1; }
.opc-task-text.done { text-decoration: line-through; color: var(--foreground-muted); }

.opc-task-priority {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.opc-task-priority.high { background: rgba(255, 71, 87, 0.15); color: var(--error); }
.opc-task-priority.medium { background: rgba(255, 165, 2, 0.15); color: var(--warning); }
.opc-task-priority.low { background: rgba(138, 138, 138, 0.15); color: var(--foreground-muted); }

.opc-workflow-steps {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-top: 0.5rem;
}

.opc-workflow-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    color: var(--foreground-muted);
}

.opc-workflow-step.completed {
    border-color: var(--success);
    color: var(--success);
    background: rgba(37, 186, 59, 0.05);
}

.opc-workflow-step.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
}

.opc-workflow-arrow {
    color: var(--border);
    font-size: 0.7rem;
}

.opc-kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.opc-kanban-col {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 0.5rem;
}

.opc-kanban-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--foreground-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.opc-kanban-card {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
}

.opc-kanban-card-title {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.opc-kanban-card-meta {
    font-size: 0.65rem;
    color: var(--foreground-muted);
}

.opc-chart-placeholder {
    height: 120px;
    background: linear-gradient(180deg, rgba(0, 255, 200, 0.05) 0%, transparent 100%);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
    gap: 4px;
}

.opc-chart-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 8px;
    transition: height 0.5s ease;
}

.opc-agent-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.opc-agent-status-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem;
    text-align: center;
}

.opc-agent-status-icon {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.opc-agent-status-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.opc-agent-status-label {
    font-size: 0.65rem;
    color: var(--foreground-muted);
}

.opc-agent-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.65rem;
}

.opc-agent-status-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.opc-agent-status-indicator .dot.online { background: var(--success); }
.opc-agent-status-indicator .dot.working { background: var(--warning); animation: pulse-dot 1.5s infinite; }
.opc-agent-status-indicator .dot.idle { background: var(--foreground-muted); }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.opc-notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.opc-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.8rem;
}

.opc-notification-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.opc-notification-text { flex: 1; }

.opc-notification-time {
    font-size: 0.65rem;
    color: var(--foreground-muted);
    flex-shrink: 0;
}

/* ─── QUICK SUGGESTIONS ─── */
.opc-suggestions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.opc-suggestion-chip {
    padding: 0.35rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--foreground-muted);
    font-family: inherit;
}

.opc-suggestion-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
}

/* ─── INPUT AREA ─── */
.opc-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--sidebar-bg);
    flex-shrink: 0;
}

.opc-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.opc-input-wrapper {
    flex: 1;
    position: relative;
}

.opc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--foreground);
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    line-height: 1.4;
}

.opc-input:focus {
}

.opc-input::placeholder {
    color: var(--foreground-muted);
}

.opc-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary);
    border: none;
    color: #000;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opc-send-btn:hover { background: var(--primary-hover); }
.opc-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.opc-quick-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.opc-quick-btn {
    padding: 0.3rem 0.65rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.opc-quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── TYPING INDICATOR ─── */
.opc-typing {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: msg-in 0.3s ease-out;
}

.opc-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 1rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 4px 12px 12px 12px;
}

.opc-typing-dot {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.opc-typing-dot:nth-child(1) { animation-delay: 0s; }
.opc-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.opc-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ─── MISSION PANEL ─── */
.opc-mission-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0,255,200,0.08), rgba(0,212,170,0.04));
    border: 1px solid rgba(0,255,200,0.15);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}
.opc-mission-progress-ring {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.opc-progress-svg {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}
.opc-progress-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 3;
}
.opc-progress-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}
.opc-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
}
.opc-mission-header-info {
    flex: 1;
    min-width: 0;
}
.opc-mission-phase {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.opc-mission-phase.complete {
    border-color: rgba(37,186,59,0.3);
    background: rgba(37,186,59,0.03);
}
.opc-mission-phase-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    user-select: none;
}
.opc-mission-phase-header:hover {
    background: var(--background-hover);
}
.opc-mission-phase-icon {
    font-size: 0.75rem;
    color: var(--primary);
    width: 16px;
    text-align: center;
}
.opc-mission-phase.complete .opc-mission-phase-icon {
    color: var(--success);
}
.opc-mission-phase-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
}
.opc-mission-phase-count {
    font-size: 0.65rem;
    color: var(--foreground-muted);
    background: var(--background-hover);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
.opc-mission-phase-arrow {
    font-size: 0.6rem;
    color: var(--foreground-muted);
}
.opc-mission-phase-desc {
    font-size: 0.68rem;
    color: var(--foreground-muted);
    padding: 0 0.65rem 0.35rem 2.1rem;
}
.opc-mission-phase-steps {
    padding: 0 0.5rem 0.5rem;
}
.opc-mission-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.35rem;
    border-radius: 6px;
}
.opc-mission-step:hover {
    background: var(--background-hover);
}
.opc-mission-step.done {
    opacity: 0.6;
}
.opc-mission-step-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    margin-top: 2px;
    color: transparent;
}
.opc-mission-step-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.opc-mission-step-body {
    flex: 1;
    min-width: 0;
}
.opc-mission-step-title {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.opc-mission-step-icon {
    font-size: 0.75rem;
}
.opc-mission-step-meta {
    margin-top: 0.15rem;
}
.opc-mission-step-agent {
    font-size: 0.6rem;
    font-weight: 500;
}
.opc-mission-step-action {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #000;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.opc-mission-step-action:hover {
    opacity: 0.85;
}


.opc-right-panel {
    width: 300px;
    min-width: 300px;
    border-left: 1px solid var(--border);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s, min-width 0.3s;
}

.opc-right-panel.collapsed {
    width: 0;
    min-width: 0;
    border-left: none;
    overflow: hidden;
}

.opc-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.opc-panel-tab {
    flex: 1;
    padding: 0.65rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--foreground-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.opc-panel-tab:hover { color: var(--foreground); }
.opc-panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.opc-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.opc-panel-section {
    margin-bottom: 1.25rem;
}

.opc-panel-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--foreground-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.opc-panel-mini-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.8rem;
}

.opc-panel-mini-stat .label { color: var(--foreground-muted); }
.opc-panel-mini-stat .value { font-weight: 600; }

.opc-website-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.opc-website-url {
    flex: 1;
    font-size: 0.78rem;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.opc-website-url:hover {
    text-decoration: underline;
}

.opc-website-copy-btn {
    background: var(--background-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground-muted);
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.opc-website-copy-btn:hover {
    border-color: var(--border-focus);
    color: var(--primary);
    background: var(--background-card);
}

.opc-website-qr {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.opc-website-qr img {
    border: 1px solid var(--border);
    border-radius: 8px;
}

.opc-panel-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.opc-panel-todo-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
}

.opc-panel-todo-check.checked {
    background: var(--success);
    border-color: var(--success);
    position: relative;
}

.opc-panel-todo-check.checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    font-size: 0.55rem;
    color: #fff;
}

.opc-panel-activity {
    display: flex;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.78rem;
}

.opc-panel-activity-time {
    color: var(--foreground-muted);
    font-size: 0.68rem;
    white-space: nowrap;
    min-width: 50px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
    .opc-right-panel { width: 260px; min-width: 260px; }
}

@media (max-width: 1024px) {
    .opc-right-panel { display: none; }
}

@media (max-width: 768px) {
    .opc-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 1000;
        transition: left 0.3s;
    }

    .opc-sidebar.open {
        left: 0;
    }

    .opc-sidebar.sidebar-collapsed {
        width: 260px;
        min-width: 260px;
    }

    .opc-msg { max-width: 95%; }
    .opc-kanban { grid-template-columns: 1fr; }
    .opc-agent-status-grid { grid-template-columns: 1fr; }
    .opc-stat-row { flex-direction: column; }
}

.opc-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.opc-sidebar-overlay.show {
    display: block;
}

/* ─── WELCOME SCREEN ─── */
.opc-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    flex-shrink: 0;
    text-align: center;
    padding: 2rem;
}

.opc-welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: #000;
    font-weight: 700;
}

.opc-welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.opc-welcome p {
    color: var(--foreground-muted);
    font-size: 0.9rem;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.opc-welcome-agents {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.opc-welcome-agent {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.opc-welcome-agent:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.opc-welcome-agent-icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.opc-welcome-agent-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.opc-welcome-agent-role {
    font-size: 0.7rem;
    color: var(--foreground-muted);
    margin-top: 0.15rem;
}

/* ─── ACCESS CHECK OVERLAY ─── */
.opc-access-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    gap: 1rem;
}

.opc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: opc-spin 0.8s linear infinite;
}

@keyframes opc-spin { to { transform: rotate(360deg); } }

.opc-access-loading span {
    color: var(--foreground-muted);
    font-size: 0.9rem;
}

/* ─── CUSTOM AGENT BADGE ─── */
.opc-badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.opc-nav-item .opc-badge-custom {
    margin-left: auto;
}

.opc-agent-tab .opc-badge-custom {
    font-size: 0.55rem;
    padding: 0.05rem 0.3rem;
}

/* ─── DAILY BRIEFING BADGE ─── */
.opc-badge-daily-briefing {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(0, 255, 200, 0.15);
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid rgba(0, 255, 200, 0.25);
}

.opc-msg.agent.custom-agent .opc-msg-avatar {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.opc-msg.agent.custom-agent .opc-msg-name {
    color: #a855f7;
}

.opc-agent-tab[data-agent-type="custom"].active {
    border-color: #a855f7;
    color: #a855f7;
}

.opc-agent-tab[data-agent-type="custom"] .tab-dot {
    background: #a855f7;
}

.opc-welcome-agent.custom-agent {
    border-color: rgba(168, 85, 247, 0.3);
}

.opc-welcome-agent.custom-agent:hover {
    border-color: #a855f7;
}

/* ─── ADD AGENT BUTTON ─── */
.opc-nav-add-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--foreground-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px dashed var(--border);
    border-radius: 6px;
    margin: 0.5rem 1rem;
    font-family: inherit;
    background: transparent;
    width: calc(100% - 2rem);
}

.opc-nav-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.03);
}

/* ─── ADD AGENT MODAL ─── */
.opc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.opc-modal {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

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

.opc-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.opc-modal-close {
    background: none;
    border: none;
    color: var(--foreground-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.opc-modal-close:hover {
    color: var(--foreground);
}

.opc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.opc-agent-pick {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.opc-agent-pick:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 200, 0.03);
}

.opc-agent-pick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    flex-shrink: 0;
}

.opc-agent-pick-info {
    flex: 1;
    min-width: 0;
}

.opc-agent-pick-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.opc-agent-pick-desc {
    font-size: 0.8rem;
    color: var(--foreground-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.opc-agent-pick-add {
    padding: 0.35rem 0.85rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.opc-agent-pick-add:hover {
    background: var(--primary-hover);
}

.opc-agent-pick-add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.opc-agent-pick-added {
    padding: 0.35rem 0.85rem;
    background: rgba(37, 186, 59, 0.15);
    color: var(--success);
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
}

.opc-modal-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--foreground-muted);
}

.opc-modal-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ─── REMOVE AGENT BUTTON ─── */
.opc-remove-agent {
    background: none;
    border: none;
    color: var(--foreground-muted);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    transition: color 0.15s;
    opacity: 0;
}

.opc-nav-item:hover .opc-remove-agent {
    opacity: 1;
}

.opc-remove-agent:hover {
    color: var(--error);
}

/* ─── PERSISTENT WORKFLOW BAR ─── */
.opc-workflow-bar {
    border-top: 1px solid var(--border);
    background: var(--sidebar-bg);
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.opc-workflow-bar::-webkit-scrollbar {
    display: none;
}

.opc-wf-bar-inner {
    display: flex;
    gap: 0.35rem;
    min-width: max-content;
    padding: 0.5rem 1rem;
}

.opc-wf-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.opc-wf-bar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
}

.opc-wf-bar-btn:active {
    transform: scale(0.97);
}

.opc-wf-bar-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* ─── WELCOME BANNER (inline in chat) ─── */
.opc-welcome-banner {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
}

.opc-wb-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.opc-wb-desc {
    font-size: 0.72rem;
    color: var(--foreground-muted);
    margin-bottom: 0.5rem;
}

.opc-wb-agents {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.opc-wb-agent {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.opc-wb-agent:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── PERSISTENT WORKFLOW BAR ─── */
.opc-workflow-bar {
    padding: 0.5rem 1.5rem;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.opc-workflow-bar::-webkit-scrollbar {
    display: none;
}

.opc-wf-bar-inner {
    display: flex;
    gap: 0.4rem;
    min-width: max-content;
}

.opc-wf-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.opc-wf-bar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
}

.opc-wf-bar-btn:active {
    transform: scale(0.97);
}

.opc-wf-bar-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* ─── DYNAMIC CHAT BUTTONS ─── */
.opc-dynamic-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.opc-msg-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
}

.opc-msg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opc-msg-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
}
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.opc-dyn-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    font-family: inherit;
    white-space: nowrap;
}

.opc-dyn-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.opc-dyn-btn-primary {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

.opc-dyn-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 12px rgba(0, 255, 200, 0.3);
}

.opc-dyn-btn-secondary {
    background: var(--background-card);
    color: var(--foreground);
    border-color: var(--border);
}

.opc-dyn-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.opc-dyn-btn-success {
    background: rgba(37, 186, 59, 0.12);
    color: var(--success);
    border-color: rgba(37, 186, 59, 0.3);
}

.opc-dyn-btn-success:hover {
    background: rgba(37, 186, 59, 0.2);
    box-shadow: 0 2px 8px rgba(37, 186, 59, 0.2);
}

.opc-dyn-btn-warning {
    background: rgba(255, 165, 2, 0.12);
    color: var(--warning);
    border-color: rgba(255, 165, 2, 0.3);
}

.opc-dyn-btn-warning:hover {
    background: rgba(255, 165, 2, 0.2);
}

.opc-dyn-btn-danger {
    background: rgba(255, 71, 87, 0.12);
    color: var(--error);
    border-color: rgba(255, 71, 87, 0.3);
}

.opc-dyn-btn-danger:hover {
    background: rgba(255, 71, 87, 0.2);
}

.opc-btn-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* ─── CHAT FORMS ─── */
.opc-chat-form {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    max-width: 480px;
}

.opc-chat-form-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.opc-chat-form-desc {
    font-size: 0.8rem;
    color: var(--foreground-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.opc-form-field {
    margin-bottom: 0.85rem;
}

.opc-form-field:last-of-type {
    margin-bottom: 1rem;
}

.opc-form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.3rem;
}

.opc-form-label .opc-form-required {
    color: var(--error);
    margin-left: 0.15rem;
}

.opc-form-help {
    font-size: 0.72rem;
    color: var(--foreground-muted);
    margin-top: 0.2rem;
}

.opc-form-input,
.opc-form-textarea,
.opc-form-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.opc-form-input::placeholder,
.opc-form-textarea::placeholder {
    color: var(--foreground-muted);
    opacity: 0.6;
}

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

.opc-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238a8a8a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.opc-form-select option {
    background: var(--background-card);
    color: var(--foreground);
}

.opc-form-multiselect {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.opc-form-multiselect-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.opc-form-multiselect-item:hover {
    border-color: var(--primary);
}

.opc-form-multiselect-item.selected {
    background: rgba(0, 255, 200, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.opc-form-multiselect-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--foreground-muted);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.2s;
}

.opc-form-multiselect-item.selected .opc-form-multiselect-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.opc-form-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.opc-form-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 12px rgba(0, 255, 200, 0.3);
}

.opc-form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.opc-form-submit-success {
    background: var(--success);
}

.opc-form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.25rem;
}

.opc-form-submitted {
    opacity: 0.6;
    pointer-events: none;
}

.opc-form-submitted-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: rgba(37, 186, 59, 0.12);
    border: 1px solid rgba(37, 186, 59, 0.3);
    border-radius: 6px;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.opc-form-skipped-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: rgba(138, 138, 138, 0.12);
    border: 1px solid rgba(138, 138, 138, 0.3);
    border-radius: 6px;
    color: var(--foreground-muted);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.opc-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.opc-form-skip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 1rem;
    background: transparent;
    color: var(--foreground-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.opc-form-skip:hover {
    border-color: var(--foreground-muted);
    color: var(--foreground);
}

/* ─── WELCOME WORKFLOWS ─── */
.opc-welcome-workflows {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 540px;
}

.opc-welcome-wf-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--foreground-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.opc-welcome-wf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.opc-welcome-wf-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--foreground);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: left;
}

.opc-welcome-wf-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 200, 0.05);
    transform: translateY(-1px);
}

.opc-wf-btn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ─── AGENT DELEGATION CARD ─── */
.opc-agent-delegate-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    border-left: 3px solid #a855f7;
}

.opc-agent-delegate-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #a855f7;
    margin-bottom: 0.25rem;
}

.opc-agent-delegate-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--foreground);
}

.opc-feedback-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(0, 255, 200, 0.06);
    border: 1px solid rgba(0, 255, 200, 0.15);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.opc-feedback-btn:hover {
    background: rgba(0, 255, 200, 0.1);
    border-color: var(--primary);
}

.opc-feedback-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.opc-feedback-modal {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
}

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

.opc-feedback-modal-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.opc-feedback-modal-title small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--foreground-muted);
    margin-top: 0.15rem;
}

.opc-feedback-modal-close {
    background: none;
    border: none;
    color: var(--foreground-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.opc-feedback-modal-close:hover { color: var(--foreground); }

.opc-feedback-modal-body {
    padding: 1.25rem 1.5rem;
}

.opc-feedback-category {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.opc-feedback-cat-btn {
    padding: 0.3rem 0.7rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.opc-feedback-cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.opc-feedback-cat-btn.active {
    background: rgba(0, 255, 200, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.opc-feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}

.opc-feedback-textarea:focus {
}

.opc-feedback-textarea::placeholder { color: var(--foreground-muted); }

.opc-feedback-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    margin-top: 1rem;
}

.opc-feedback-submit:hover { background: var(--primary-hover); }
.opc-feedback-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.opc-feedback-my-list {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.opc-feedback-my-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--foreground-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.opc-feedback-my-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.8rem;
}

.opc-feedback-my-item:last-child { border-bottom: none; }

.opc-feedback-my-msg {
    color: var(--foreground);
    margin-bottom: 0.2rem;
}

.opc-feedback-my-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    color: var(--foreground-muted);
}

.opc-feedback-my-reply {
    margin-top: 0.3rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 255, 200, 0.05);
    border-left: 2px solid var(--primary);
    border-radius: 0 4px 4px 0;
    font-size: 0.75rem;
    color: var(--primary);
}

.opc-feedback-status {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

.opc-feedback-status.pending { background: rgba(255, 165, 2, 0.15); color: var(--warning); }
.opc-feedback-status.reviewed { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.opc-feedback-status.resolved { background: rgba(37, 186, 59, 0.15); color: var(--success); }

.opc-feedback-success {
    text-align: center;
    padding: 1.5rem;
}

.opc-feedback-success-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.opc-feedback-success-text {
    color: var(--foreground-muted);
    font-size: 0.85rem;
}

/* ─── INPUT FIELD HIGHLIGHTS ─── */
.opc-input,
.opc-lang-select,
.opc-form-input,
.opc-form-textarea,
.opc-form-select,
.opc-feedback-textarea {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #333;
    transition: border-color 0.2s, background 0.2s;
}

