/* ============================================
   Chat Dashboard Styles
   ============================================ */

/* ── ArviKMedia Publish Result Banner ──────────────────────────────────── */
.arvik-publish-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin: 0.75rem 1rem;
    font-size: 0.87rem;
    animation: apb-slide-in 0.3s ease;
    flex-wrap: wrap;
}

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

.arvik-publish-success {
    background: #d1fae5;
    border: 1.5px solid #6ee7b7;
    color: #065f46;
}

.arvik-publish-error {
    background: #fee2e2;
    border: 1.5px solid #fca5a5;
    color: #7f1d1d;
}

[data-theme="dark"] .arvik-publish-success {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.4);
    color: #6ee7b7;
}

[data-theme="dark"] .arvik-publish-error {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5;
}

.apb-icon { font-size: 1.25rem; flex-shrink: 0; }

.apb-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.apb-body strong { font-weight: 700; font-size: 0.88rem; }
.apb-sub { font-size: 0.75rem; opacity: 0.75; }

.apb-link {
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    border: 1.5px solid currentColor;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.apb-link:hover { opacity: 1; }

.apb-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.55;
    padding: 0.2rem;
    color: inherit;
    flex-shrink: 0;
}
.apb-close:hover { opacity: 1; }

.chat-main {
    padding: 0 !important;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   Live News Panel
   ============================================ */

.news-panel {
    width: 280px;
    flex-shrink: 0;
    background: var(--sidebar-bg, #f9fafb);
    border-right: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s ease;
}

.news-panel.collapsed {
    width: 40px;
}

.news-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    white-space: nowrap;
    user-select: none;
    gap: 0.5rem;
    background: var(--card-bg, #fff);
}

.news-panel.collapsed .news-panel-header span { display: none; }

.news-panel-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: inherit;
    padding: 0;
    flex-shrink: 0;
}

.news-panel-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-panel.collapsed .news-panel-body { display: none; }

.news-panel-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0.625rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.np-tab {
    background: none;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    cursor: pointer;
    color: inherit;
    transition: background 0.15s, color 0.15s;
}

.np-tab.active, .np-tab:hover {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: transparent;
}

.news-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.np-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
    font-size: 0.8rem;
}

.np-item {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.625rem;
    cursor: default;
}

.np-item-headline {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-item-meta {
    font-size: 0.68rem;
    color: #9ca3af;
    margin-bottom: 0.4rem;
}

.np-item-actions {
    display: flex;
    gap: 0.4rem;
}

.np-gen-btn, .np-pub-btn {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.15s;
}

.np-gen-btn {
    background: var(--primary, #6366f1);
    color: #fff;
}

.np-pub-btn {
    background: #10b981;
    color: #fff;
}

.np-gen-btn:hover, .np-pub-btn:hover { opacity: 0.85; }

.np-refresh-btn {
    margin: 0.5rem;
    padding: 0.4rem;
    background: none;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    color: inherit;
}

.np-refresh-btn:hover { background: var(--border-color, #e5e7eb); }

[data-theme="dark"] .news-panel { background: #1e1e2e; border-color: #374151; }
[data-theme="dark"] .news-panel-header { background: #111827; }
[data-theme="dark"] .np-item { background: #111827; border-color: #374151; }

@media (max-width: 900px) {
    .news-panel { display: none; }
}

/* ============================================
   Chat Sidebar (History)
   ============================================ */

.chat-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-sidebar-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.btn-new-chat {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid #667eea;
    background: #667eea;
    color: white;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-new-chat:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.history-item:hover {
    background: #f3f4f6;
}

.history-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    border-left: 3px solid #667eea;
}

.history-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.history-meta {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

.chat-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-clear-history {
    width: 100%;
    padding: 0.6rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-clear-history:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

/* ============================================
   Main Chat Area
   ============================================ */

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f9fafb;
}

/* Chat Header */
.chat-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ai-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.ai-status {
    font-size: 0.8rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-new-chat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 20px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #6366f1;
    background: #6366f1;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-new-chat:hover { background: #4f46e5; border-color: #4f46e5; }
html[data-theme="dark"] .btn-new-chat { background: #6366f1; border-color: #6366f1; color: #fff; }
html[data-theme="dark"] .btn-new-chat:hover { background: #4f46e5; }

.btn-icon-header {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-header:hover {
    background: #f3f4f6;
    border-color: #667eea;
}

.btn-icon-header.active {
    background: #667eea;
    border-color: #667eea;
}

/* Mode Banner */
.mode-banner {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}

.mode-banner button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.mode-banner button:hover {
    background: rgba(255,255,255,0.3);
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

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

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.message-bubble {
    background: white;
    border-radius: 16px;
    padding: 0.875rem 1.125rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 4px 16px 16px;
}

.chat-message.assistant .message-bubble {
    border-radius: 4px 16px 16px 16px;
}

.message-bubble p {
    margin: 0 0 0.5rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.message-bubble p:last-of-type {
    margin-bottom: 0;
}

.message-bubble ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.message-bubble ul li {
    margin-bottom: 0.25rem;
}

.message-bubble strong {
    font-weight: 600;
}

.message-time {
    font-size: 0.72rem;
    color: #9ca3af;
    display: block;
    margin-top: 0.5rem;
}

.chat-message.user .message-time {
    color: rgba(255,255,255,0.7);
}

.ctype-tag {
    display: inline-block;
    font-size: 0.72rem;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    margin-bottom: 0.35rem;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    align-self: flex-start;
    animation: fadeInUp 0.3s ease;
}

.typing-dots {
    background: white;
    border-radius: 16px;
    padding: 0.875rem 1.125rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Image message */
.message-image {
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    max-width: 300px;
}

.message-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Copy button in message */
.message-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.btn-msg-action {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #667eea;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.btn-msg-action:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Quick Prompts Bar */
.quick-prompts-bar {
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    scrollbar-width: none;
}

.quick-prompts-bar::-webkit-scrollbar {
    display: none;
}

.prompt-chip {
    padding: 0.4rem 0.875rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
    color: #374151;
}

.prompt-chip:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Content Type Bar */
.content-type-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.ctype-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1.5px solid #e5e7eb;
    background: white;
    color: #6b7280;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.ctype-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.ctype-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Media Upload Bar */
.media-upload-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.clip-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.clip-btn:hover {
    border-color: #667eea;
    background: #f3f4ff;
}

.media-preview-name {
    font-size: 0.8rem;
    color: #667eea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.media-clear-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.media-clear-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Media Thumbnail */
.media-thumb-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.media-thumb-wrap img {
    height: 60px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    object-fit: cover;
}

.media-thumb-wrap button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Input Area */
.chat-input-area {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    background: white;
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.5;
    max-height: 120px;
    outline: none;
    color: #1f2937;
}

.input-wrapper textarea::placeholder {
    color: #9ca3af;
}

.btn-send {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.input-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.char-counter-small {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ============================================
   Content Panel (Right)
   ============================================ */

.content-panel {
    width: 300px;
    background: white;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.content-panel-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.btn-icon-sm {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

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

.content-panel-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-panel-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.content-panel-empty p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.hint-text {
    font-size: 0.8rem !important;
    color: #d1d5db;
}

/* Content Cards */
.content-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
}

.content-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.content-card-text {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.content-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.btn-card-action {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.btn-card-action:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-card-action.primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-card-action.primary:hover {
    background: #4f46e5;
}

/* Image content card */
.content-card-image {
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.content-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hashtags */
.hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.hashtag-chip {
    padding: 0.25rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1200px) {
    .content-panel {
        display: none;
    }
}

@media (max-width: 900px) {
    .chat-sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .chat-message {
        max-width: 95%;
    }

    .quick-prompts-bar {
        padding: 0.5rem 1rem;
    }

    .chat-input-area {
        padding: 0.75rem 1rem;
    }
}

/* Platform Selector Bar */
.platform-selector-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.platform-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    margin-right: 0.2rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    border: 1.5px solid transparent;
    background: white;
    color: #6b7280;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pb-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.pb-name {
    font-size: 0.67rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.platform-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102,126,234,0.15);
}

.platform-btn[data-platform="instagram"]:hover  { border-color:#e1306c; color:#e1306c; }
.platform-btn[data-platform="facebook"]:hover   { border-color:#1877f2; color:#1877f2; }
.platform-btn[data-platform="twitter"]:hover    { border-color:#1da1f2; color:#1da1f2; }
.platform-btn[data-platform="linkedin"]:hover   { border-color:#0077b5; color:#0077b5; }
.platform-btn[data-platform="pinterest"]:hover  { border-color:#e60023; color:#e60023; }

.platform-btn.active {
    border-color: transparent;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 3px 10px rgba(102,126,234,0.35);
}

.platform-btn[data-platform="instagram"].active { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.platform-btn[data-platform="facebook"].active  { background: #1877f2; }
.platform-btn[data-platform="twitter"].active   { background: #1da1f2; }
.platform-btn[data-platform="linkedin"].active  { background: #0077b5; }
.platform-btn[data-platform="pinterest"].active { background: #e60023; }

/* Post Preview Overlay */
.post-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.post-preview-overlay.open {
    display: flex;
}

.post-preview-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.preview-platform-icon {
    font-size: 1.75rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
}

.preview-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
}

.preview-subtitle {
    font-size: 0.8rem;
    color: #10b981;
}

.preview-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.preview-close:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.preview-body {
    padding: 1.25rem 1.5rem;
}

/* Account selector row */
.preview-account-row {
    margin-bottom: 1rem;
}
.preview-account-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.preview-account-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    outline: none;
}
.preview-account-select:focus { border-color: #667eea; }
.preview-account-hint {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    color: #6b7280;
}

/* Platform Mock Frame */
.platform-mock-frame {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.mock-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.mock-username {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.mock-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.mock-content-image {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.mock-content-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.mock-content-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.5rem;
}

.mock-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.mock-hashtag {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
}

.mock-engagement {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: #9ca3af;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Edit & Schedule Areas */
.preview-edit-area textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    margin-bottom: 0.75rem;
}

.preview-edit-area textarea:focus {
    border-color: #667eea;
}

.btn-save-edit, .btn-confirm-schedule {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.preview-schedule-area {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.preview-schedule-area label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.preview-schedule-area input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    margin-bottom: 0.75rem;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.preview-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.preview-btn.edit {
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}

.preview-btn.edit:hover { background: #e5e7eb; }

.preview-btn.schedule {
    background: #fff7ed;
    color: #ea580c;
    border: 1.5px solid #fed7aa;
}

.preview-btn.schedule:hover { background: #ffedd5; }

.preview-btn.post-now {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.preview-btn.post-now:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* ============================================
   Social Post Card (Image + Text — one combined card)
   ============================================ */

.chat-message.combined {
    align-items: flex-start;
}

.spc-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 460px;
    width: 100%;
}

/* Header: avatar + account name + platform */
.spc-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.spc-avatar {
    font-size: 1.8rem;
    line-height: 1;
}

.spc-account {
    display: flex;
    flex-direction: column;
}

.spc-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
}

.spc-platform {
    font-size: 0.72rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 1px;
}

/* Image — full width, no padding */
.spc-image {
    width: 100%;
    line-height: 0;
    background: #f3f4f6;
}

.spc-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Caption text */
.spc-text {
    padding: 0.85rem 1rem 0.5rem;
    font-size: 0.9rem;
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Hashtags */
.spc-tags {
    padding: 0 1rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* Footer: model + time */
.spc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    border-top: 1px solid #f3f4f6;
}

.spc-model {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Action buttons row */
.spc-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.85rem;
    flex-wrap: wrap;
}

.spc-actions .btn-msg-action {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.spc-actions .primary-action {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
}

/* ============================================
   Sidebar Chat History Section
   ============================================ */

.nav-history-section {
    border-top: 1px solid #f0f0f0;
    margin-top: 0.25rem;
}

.nav-history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
    user-select: none;
}

.nav-history-header:hover {
    background: #f9fafb;
    color: #374151;
}

.history-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.sidebar-history-list {
    display: none;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.sidebar-history-list.open {
    display: flex;
}

.sidebar-history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 1rem 0.55rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.sidebar-history-item:hover {
    background: #f0f4ff;
}

.sidebar-history-icon {
    font-size: 0.85rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.sidebar-history-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-history-title {
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sidebar-history-time {
    font-size: 0.68rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1px;
}

.history-credit-badge {
    background: #fef3c7;
    color: #b45309;
    border-radius: 4px;
    padding: 0 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

.sidebar-history-empty {
    padding: 0.75rem 1.25rem;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ============================================
   Credits Display in Sidebar Footer
   ============================================ */

.credits-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #fef9ef;
    border-radius: 8px;
    margin: 0 0.75rem 0.5rem;
    border: 1px solid #fde68a;
}

.credits-label {
    font-size: 0.78rem;
    color: #92400e;
    font-weight: 500;
}

.credits-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #b45309;
}

/* Publish success banner inside preview modal */
/* ── In-chat publish notification ───────────────────────────────────────── */
.chat-publish-notify {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem auto;
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1.5px solid #34d399;
    border-radius: 20px;
    max-width: 420px;
    font-size: 0.82rem;
    color: #065f46;
    animation: fadeInDown 0.35s ease;
}
.cpn-icon { font-size: 1rem; flex-shrink: 0; }
.cpn-text { flex: 1; }
.cpn-time { font-size: 0.72rem; color: #6ee7b7; white-space: nowrap; flex-shrink: 0; }

.publish-success-banner {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1.5px solid #34d399;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #065f46;
    text-align: center;
    animation: fadeInDown 0.3s ease;
}

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

/* ══════════════════════════════════════════════════════════════
   DARK MODE — chat page
   ══════════════════════════════════════════════════════════════ */
html[data-theme="dark"] .chat-sidebar            { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .chat-sidebar-header     { border-color: #334155; }
html[data-theme="dark"] .chat-sidebar-header h3  { color: #f1f5f9; }
html[data-theme="dark"] .chat-history-list .history-item:hover { background: #253047; }
html[data-theme="dark"] .history-item.active     { background: rgba(99,102,241,0.14); border-left-color: #818cf8; }
html[data-theme="dark"] .history-title           { color: #cbd5e1; }
html[data-theme="dark"] .history-time            { color: #475569; }
html[data-theme="dark"] .chat-sidebar-footer     { border-color: #334155; }
html[data-theme="dark"] .btn-clear-history       { background: #1e293b; border-color: #334155; color: #64748b; }
html[data-theme="dark"] .btn-clear-history:hover { background: #2d1a1a; border-color: #ef4444; color: #ef4444; }

html[data-theme="dark"] .chat-area               { background: #0f172a; }
html[data-theme="dark"] .chat-header             { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .ai-name                 { color: #f1f5f9; }
html[data-theme="dark"] .btn-icon-header         { background: #1e293b; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .btn-icon-header:hover   { background: #253047; border-color: #6366f1; }
html[data-theme="dark"] .btn-icon-header.active  { background: #6366f1; border-color: #6366f1; }

html[data-theme="dark"] .chat-messages           { background: #0f172a; }
html[data-theme="dark"] .message-bubble          { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
html[data-theme="dark"] .message-bubble p        { color: #e2e8f0; }
html[data-theme="dark"] .message-time            { color: #475569; }
html[data-theme="dark"] .typing-dots             { background: #1e293b; }
html[data-theme="dark"] .typing-dots span        { background: #475569; }

html[data-theme="dark"] .quick-prompts-bar       { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .prompt-chip             { background: #253047; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .prompt-chip:hover       { background: #6366f1; color: white; border-color: #6366f1; }

html[data-theme="dark"] .content-type-bar .ctype-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .ctype-btn:hover         { border-color: #6366f1; color: #a5b4fc; }
html[data-theme="dark"] .ctype-btn.active        { background: #6366f1; border-color: #6366f1; color: white; }

html[data-theme="dark"] .platform-selector-bar   { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .platform-label          { color: #64748b; }
html[data-theme="dark"] .platform-btn            { background: #253047; color: #94a3b8; box-shadow: none; }

html[data-theme="dark"] .chat-input-area         { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .input-wrapper           { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .input-wrapper:focus-within { border-color: #6366f1; background: #0f172a; }
html[data-theme="dark"] .input-wrapper textarea  { color: #f1f5f9; }
html[data-theme="dark"] .input-wrapper textarea::placeholder { color: #475569; }
html[data-theme="dark"] .input-hint, html[data-theme="dark"] .char-counter-small { color: #475569; }
html[data-theme="dark"] .clip-btn                { background: #253047; border-color: #334155; }
html[data-theme="dark"] .clip-btn:hover          { border-color: #6366f1; background: #1e293b; }

html[data-theme="dark"] .content-panel           { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .content-panel-header    { border-color: #334155; }
html[data-theme="dark"] .content-panel-header h3 { color: #f1f5f9; }
html[data-theme="dark"] .content-panel-empty     { color: #64748b; }
html[data-theme="dark"] .content-card            { background: #253047; border-color: #334155; }
html[data-theme="dark"] .content-card-text       { color: #cbd5e1; }
html[data-theme="dark"] .btn-card-action         { background: #334155; border-color: #475569; color: #cbd5e1; }
html[data-theme="dark"] .btn-card-action:hover   { background: #6366f1; color: white; border-color: #6366f1; }
html[data-theme="dark"] .btn-msg-action          { background: #334155; border-color: #475569; color: #94a3b8; }
html[data-theme="dark"] .btn-msg-action:hover    { background: #6366f1; color: white; }

html[data-theme="dark"] .spc-card                { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .spc-header              { border-color: #334155; }
html[data-theme="dark"] .spc-name                { color: #f1f5f9; }
html[data-theme="dark"] .spc-platform            { color: #64748b; }
html[data-theme="dark"] .spc-image               { background: #253047; }
html[data-theme="dark"] .spc-text                { color: #e2e8f0; }
html[data-theme="dark"] .spc-footer              { border-color: #334155; }
html[data-theme="dark"] .spc-model               { color: #475569; }

html[data-theme="dark"] .post-preview-modal      { background: #1e293b; }
html[data-theme="dark"] .preview-header          { border-color: #334155; }
html[data-theme="dark"] .preview-title           { color: #f1f5f9; }
html[data-theme="dark"] .preview-close           { background: #253047; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .platform-mock-frame     { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .mock-username           { color: #f1f5f9; }
html[data-theme="dark"] .mock-content-text       { color: #e2e8f0; }
html[data-theme="dark"] .mock-engagement         { border-color: #334155; color: #64748b; }
html[data-theme="dark"] .preview-account-select  { background: #253047; border-color: #334155; color: #f1f5f9; }
html[data-theme="dark"] .preview-account-label   { color: #cbd5e1; }
html[data-theme="dark"] .preview-account-hint    { color: #64748b; }
html[data-theme="dark"] .preview-schedule-area   { background: #0f172a; }
html[data-theme="dark"] .preview-schedule-area label { color: #cbd5e1; }
html[data-theme="dark"] .preview-schedule-area input { background: #253047; border-color: #334155; color: #f1f5f9; }
html[data-theme="dark"] .preview-actions         { border-color: #334155; }
html[data-theme="dark"] .preview-btn.edit        { background: #334155; border-color: #475569; color: #cbd5e1; }
html[data-theme="dark"] .preview-edit-area textarea { background: #253047; border-color: #334155; color: #f1f5f9; }

html[data-theme="dark"] .history-view-banner     { background: #1c1a0f; border-color: #78350f; color: #fbbf24; }

/* ── Sidebar toggle ──────────────────────────────────────────────────────────*/

.sidebar-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    padding: .2rem .4rem;
    border-radius: .35rem;
    line-height: 1;
    margin-left: auto;
}
.sidebar-close-btn:hover { background: rgba(0,0,0,.08); color: #374151; }

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: .3rem .5rem;
    border-radius: .5rem;
    margin-right: .5rem;
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-toggle-btn:hover { background: #f3f4f6; color: #4f46e5; }

/* Hidden state */
.sidebar-hidden {
    transform: translateX(-100%);
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden;
}

/* Smooth transition */
.sidebar {
    transition: transform .22s ease, width .22s ease;
}

/* Push main content when sidebar hides */
.sidebar-hidden ~ .main-content {
    margin-left: 0 !important;
}

/* Overlay for clicking outside */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
}
.sidebar-overlay-visible {
    display: block;
}

/* ── ArviKMedia Feed Toggle ───────────────────────────────────────────── */
.arvik-feed-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px;
    margin-bottom: 6px;
}
.arvik-feed-toggle-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
    user-select: none;
}
.arvik-feed-toggle-label input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; }
.arvik-feed-check-icon { font-size: 14px; }
.arvik-feed-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
}
html[data-theme="dark"] .arvik-feed-toggle-bar { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); }
html[data-theme="dark"] .arvik-feed-toggle-label { color: #cbd5e1; }

/* ── AI Mode Bar ──────────────────────────────────────────────────────── */
.ai-mode-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ai-mode-bar::-webkit-scrollbar { display: none; }
.ai-mode-label { font-size: 11px; color: var(--gray-700); white-space: nowrap; flex-shrink: 0; }
.ai-mode-btn {
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    background: transparent;
    color: var(--gray-700);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ai-mode-btn:hover { background: var(--gray-100); }
.ai-mode-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
html[data-theme="dark"] .ai-mode-label { color: #94a3b8; }
html[data-theme="dark"] .ai-mode-btn { border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .ai-mode-btn:hover { background: #1e293b; }
html[data-theme="dark"] .ai-mode-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Quick prompt group labels ────────────────────────────────────────── */
.prompts-group-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
html[data-theme="dark"] .prompts-group-label { background: #1e293b; color: #64748b; }

/* ── ArviKMedia feed publish notification ─────────────────────────────── */
.arvik-feed-notify {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 6px 0;
    font-size: 12px;
    color: var(--primary);
}

/* Dark mode */
html[data-theme="dark"] .sidebar-toggle-btn        { color: #94a3b8; }
html[data-theme="dark"] .sidebar-toggle-btn:hover  { background: rgba(99,102,241,.15); color: #a5b4fc; }
html[data-theme="dark"] .sidebar-close-btn         { color: #64748b; }
html[data-theme="dark"] .sidebar-close-btn:hover   { background: rgba(255,255,255,.06); color: #e2e8f0; }
