/* ==========================================================================
   ARKENSTONE REGISTRY — AI CHAT BUBBLE
   Floating glassmorphism chat panel (bottom-right, always-accessible)
   ========================================================================== */

/* ── FLOATING BUBBLE ────────────────────────────────────────────────────── */
.chat-bubble-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    pointer-events: none;
}

.chat-bubble {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    border: none;
    cursor: pointer;
    box-shadow:
        0 4px 20px rgba(180, 130, 30, 0.45),
        0 0 0 3px rgba(255,255,255,0.12),
        inset 0 1px 0 rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff8e8;
    font-size: 22px;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s;
    pointer-events: all;
    position: relative;
    flex-shrink: 0;
}
.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow:
        0 8px 32px rgba(180, 130, 30, 0.6),
        0 0 0 3px rgba(255,255,255,0.18),
        inset 0 1px 0 rgba(255,255,255,0.25);
}
.chat-bubble.open {
    transform: scale(0.92);
    background: linear-gradient(135deg, #6b4f10 0%, #3d2c08 100%);
}
.chat-bubble i { transition: transform 0.2s; }
.chat-bubble.open i { transform: rotate(15deg); }

/* Unread badge */
.chat-bubble-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-surface-card, #fff);
    display: none;
}
.chat-bubble-badge.visible { display: flex; }

/* Keyboard hint tooltip */
.chat-bubble-hint {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-rule, #e5e0d8);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 10px;
    font-family: var(--font-body);
    color: var(--color-ink-muted);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}
.chat-bubble:hover .chat-bubble-hint,
.chat-bubble:focus .chat-bubble-hint { opacity: 1; transform: translateY(0); }

/* ── GLASSMORPHISM PANEL ────────────────────────────────────────────────── */
:root { --chat-rail-w: 410px; }

/* Docked right rail (Phase 2: the assistant is a first-class surface) */
.chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--chat-rail-w);
    height: 100vh;
    max-height: none;
    z-index: 1199;
    border-radius: 0;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    background: rgba(254, 251, 244, 0.96);
    border: none;
    border-left: 1px solid rgba(200, 160, 60, 0.22);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Hidden state — slide off the right edge */
    transform: translateX(100%);
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.35, 1);
}
.chat-panel.open {
    transform: translateX(0);
    pointer-events: all;
}

/* Reflow main content so the rail doesn't cover it when docked open */
.main-area { transition: margin-right 0.28s cubic-bezier(0.25, 1, 0.35, 1); }
body.chat-rail-open .main-area { margin-right: var(--chat-rail-w); }
/* When docked open, the floating launcher is redundant */
body.chat-rail-open .chat-bubble,
body.chat-rail-open .chat-bubble-hint { display: none; }

/* On narrow screens the rail overlays instead of reflowing */
@media (max-width: 1100px) {
    body.chat-rail-open .main-area { margin-right: 0; }
}
@media (max-width: 480px) {
    :root { --chat-rail-w: 100vw; }
}

[data-theme="dark"] .chat-panel {
    background: rgba(22, 16, 8, 0.91);
    border-color: rgba(200, 160, 60, 0.18);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(200,160,60,0.1),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── PANEL HEADER ───────────────────────────────────────────────────────── */
.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(200, 160, 60, 0.15);
    background: linear-gradient(135deg,
        rgba(200,160,60,0.08) 0%,
        rgba(200,160,60,0.02) 100%);
    flex-shrink: 0;
}

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff8e8;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(180,130,30,0.35);
}

.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-ink-primary);
    line-height: 1.2;
}
.chat-header-sub {
    font-size: 10px;
    color: var(--color-ink-muted);
    margin-top: 1px;
}
.chat-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #27ae60;
    margin-right: 4px;
    vertical-align: middle;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.chat-header-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--color-ink-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.1s, color 0.1s;
}
.chat-header-btn:hover {
    background: rgba(200,160,60,0.12);
    color: var(--color-ink-primary);
}
.chat-header-btn.close:hover { background: rgba(192,57,43,0.1); color: #c0392b; }

/* ── MESSAGES AREA ──────────────────────────────────────────────────────── */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(200,160,60,0.25); border-radius: 2px; }

/* ── QUICK CHIPS (empty state) ──────────────────────────────────────────── */
.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 8px 8px;
    gap: 16px;
}
.chat-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(200,160,60,0.15) 0%, rgba(200,160,60,0.05) 100%);
    border: 1px solid rgba(200,160,60,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gold);
}
.chat-empty-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-ink-primary);
    text-align: center;
}
.chat-empty-sub {
    font-size: 11.5px;
    color: var(--color-ink-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: -10px;
}
.chat-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.chat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--color-border-rule);
    border-radius: 10px;
    background: var(--color-surface-card);
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--color-ink-primary);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.12s, background 0.12s, transform 0.1s;
}
.chat-chip:hover {
    border-color: var(--gold-pale);
    background: var(--gold-faint);
    transform: translateX(3px);
}
.chat-chip i { color: var(--gold); font-size: 14px; flex-shrink: 0; }

/* ── MESSAGES ───────────────────────────────────────────────────────────── */
.chat-msg {
    display: flex;
    gap: 8px;
    max-width: 100%;
    animation: chat-msg-in 0.18s ease;
}
@keyframes chat-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* User messages — right-aligned */
.chat-msg.user {
    flex-direction: row-reverse;
}
.chat-msg.user .chat-msg-bubble {
    background: linear-gradient(135deg, #c9a227 0%, #a07818 100%);
    color: #1a0f00;
    border-radius: 16px 4px 16px 16px;
    box-shadow: 0 2px 10px rgba(180,130,30,0.25);
}
.chat-msg.user .chat-msg-avatar {
    background: linear-gradient(135deg, rgba(200,160,60,0.2) 0%, rgba(200,160,60,0.1) 100%);
    color: var(--gold);
}

/* Assistant messages — left-aligned */
.chat-msg.assistant .chat-msg-bubble {
    background: rgba(255,255,255,0.85);
    color: var(--color-ink-primary);
    border: 1px solid rgba(200,160,60,0.12);
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .chat-msg.assistant .chat-msg-bubble {
    background: rgba(40, 30, 12, 0.75);
    border-color: rgba(200,160,60,0.18);
}

.chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    color: #fff8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
}
.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-msg-bubble {
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 300px;
    word-break: break-word;
    white-space: normal;          /* assistant uses innerHTML; user overrides below */
}
/* User bubbles: preserve literal line-breaks from the textarea */
.chat-msg.user .chat-msg-bubble { white-space: pre-wrap; }

/* Thinking state */
.chat-msg-thinking {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}
.chat-msg-thinking span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: chat-dot 1.2s infinite;
}
.chat-msg-thinking span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg-thinking span:nth-child(3) { animation-delay: 0.30s; }
@keyframes chat-dot {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
    40%           { transform: scale(1);    opacity: 1; }
}

/* Streaming cursor */
.chat-cursor {
    display: inline-block;
    width: 2px;
    height: 13px;
    background: var(--gold);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: ai-blink 0.7s infinite;
}

/* ── INPUT AREA ─────────────────────────────────────────────────────────── */
.chat-input-wrap {
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(200,160,60,0.12);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}
[data-theme="dark"] .chat-input-wrap { background: rgba(20,14,4,0.5); }

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: var(--color-surface-card);
    border: 1.5px solid var(--color-border-rule);
    border-radius: 14px;
    padding: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#chatInput { padding-left: 4px; }
.chat-input-row:focus-within {
    border-color: rgba(200,160,60,0.5);
    box-shadow: 0 0 0 3px rgba(200,160,60,0.08);
}

#chatInput {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-ink-primary);
    resize: none;
    max-height: 100px;
    min-height: 22px;
    line-height: 1.5;
    padding: 3px 0;
}
#chatInput::placeholder { color: var(--color-ink-muted); }

.chat-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    border: none;
    color: #fff8e8;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: filter 0.12s, transform 0.1s;
}
.chat-send-btn:hover  { filter: brightness(1.12); }
.chat-send-btn:active { transform: scale(0.94); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }

.chat-input-hint {
    font-size: 9.5px;
    color: var(--color-ink-muted);
    text-align: center;
    margin-top: 6px;
    opacity: 0.7;
}

/* ── MARKDOWN RENDERING (assistant bubbles only) ────────────────────────── */
.chat-msg.assistant .chat-msg-bubble .chat-p {
    margin: 0 0 7px;
}
.chat-msg.assistant .chat-msg-bubble .chat-p:last-child { margin-bottom: 0; }

.chat-msg.assistant .chat-msg-bubble .chat-mdh {
    font-weight: 700;
    color: var(--color-ink-primary);
    margin: 10px 0 4px;
    line-height: 1.3;
}
.chat-msg.assistant .chat-msg-bubble h4.chat-mdh { font-size: 13px; }
.chat-msg.assistant .chat-msg-bubble h3.chat-mdh { font-size: 14px; }
.chat-msg.assistant .chat-msg-bubble h2.chat-mdh { font-size: 15px; }

.chat-msg.assistant .chat-msg-bubble .chat-ul,
.chat-msg.assistant .chat-msg-bubble .chat-ol {
    margin: 4px 0 8px 18px;
    padding: 0;
}
.chat-msg.assistant .chat-msg-bubble li {
    margin-bottom: 3px;
    line-height: 1.55;
}
.chat-msg.assistant .chat-msg-bubble li:last-child { margin-bottom: 0; }

.chat-msg.assistant .chat-msg-bubble .chat-hr {
    border: none;
    border-top: 1px solid rgba(200,160,60,0.2);
    margin: 10px 0;
}

/* Inline code */
.chat-msg-bubble .chat-ic {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.87em;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(200, 160, 60, 0.12);
    color: #8b5e00;
    border: 1px solid rgba(200,160,60,0.18);
}
.chat-msg.user .chat-msg-bubble .chat-ic {
    background: rgba(0,0,0,0.18);
    border-color: rgba(0,0,0,0.12);
    color: #1a0f00;
}
[data-theme="dark"] .chat-msg.assistant .chat-msg-bubble .chat-ic {
    background: rgba(200,160,60,0.15);
    color: #d4a843;
}

/* Fenced code blocks */
.chat-cb {
    border-radius: 8px;
    overflow: hidden;
    margin: 8px 0;
    background: #1a1824;
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 12px;
}
.chat-cb:first-child { margin-top: 2px; }
.chat-cb:last-child  { margin-bottom: 0; }

.chat-cb-lang {
    display: block;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
    padding: 7px 12px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.chat-cb pre {
    margin: 0;
    padding: 10px 12px 12px;
    overflow-x: auto;
}
.chat-cb pre::-webkit-scrollbar { height: 4px; }
.chat-cb pre::-webkit-scrollbar-track { background: transparent; }
.chat-cb pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.chat-cb pre code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #e2dfd8;
    white-space: pre;
    background: none;
    border: none;
    padding: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   PHASE 2 — header launch button, conversation history, attachments
   ══════════════════════════════════════════════════════════════════════════ */

/* Dedicated topbar button (replaces the floating bubble) */
.btn-assistant {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    border: 1px solid var(--gold-pale);
    background: linear-gradient(135deg, var(--gold-faint) 0%, rgba(200,160,60,0.04) 100%);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s, transform 0.1s;
    white-space: nowrap;
}
.btn-assistant:hover { background: var(--gold-pale); border-color: var(--gold); }
.btn-assistant:active { transform: translateY(1px); }
.btn-assistant i { font-size: 15px; }
.btn-assistant.active {
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    border-color: var(--gold);
    color: #fff8e8;
    box-shadow: 0 2px 10px rgba(180,130,30,0.35);
}
.assistant-btn-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 9px; height: 9px;
    border-radius: 50%;
    background: #c0392b;
    border: 2px solid var(--color-surface-card);
}
@media (max-width: 720px) { .btn-assistant span { display: none; } .btn-assistant { padding: 7px 10px; } }

/* Conversation-history flyout */
.chat-history-panel {
    flex-shrink: 0;
    max-height: 240px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(200,160,60,0.15);
    background: var(--color-canvas-secondary);
    padding: 6px;
}
.chat-hist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 12.5px;
    color: var(--color-ink-primary);
}
.chat-hist-item:hover { background: var(--gold-faint); }
.chat-hist-item.active { background: var(--gold-pale); font-weight: 600; }
.chat-hist-item i { color: var(--gold); font-size: 14px; flex-shrink: 0; }
.chat-hist-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hist-loading, .chat-hist-empty { padding: 14px; font-size: 12px; color: var(--color-ink-muted); text-align: center; }

/* Attachment button + tray */
.chat-attach-btn {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 9px;
    border: 1px solid var(--color-border-rule);
    background: var(--color-canvas-secondary);
    color: var(--color-ink-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
    align-self: flex-end;
}
.chat-attach-btn:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-faint); }
.chat-attach-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.chat-attach-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--gold-faint);
    border: 1px solid var(--gold-pale);
    font-size: 11px;
    color: var(--color-ink-primary);
    max-width: 180px;
}
.chat-attach-chip .chat-attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-attach-chip button { background: none; border: none; color: var(--color-ink-muted); cursor: pointer; display: flex; padding: 0; }
.chat-attach-chip button:hover { color: var(--color-danger, #c0392b); }

/* Agent tool-activity steps (shown live above the answer while the assistant works) */
.chat-tool-steps { display: flex; flex-direction: column; gap: 4px; }
.chat-tool-steps:not(:empty) { margin-bottom: 8px; }
.chat-tool-step {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--gold-faint);
    border: 1px solid var(--gold-pale);
    font-size: 11.5px;
    color: var(--color-ink-muted);
}
.chat-tool-step.done { color: var(--color-ink-primary); }
.chat-tool-icon { color: var(--gold); font-size: 13px; flex-shrink: 0; }
.chat-tool-label { flex: 1; }
.chat-tool-spin { font-size: 12px; color: var(--gold); animation: spin 1s linear infinite; }
.chat-tool-done { font-size: 13px; color: #1D5C38; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Write-action confirmation card (the assistant proposes; user confirms) */
.chat-confirm-card {
    border: 1px solid var(--gold-pale);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-faint) 0%, rgba(200,160,60,0.03) 100%);
    padding: 12px;
    margin-top: 2px;
}
.chat-confirm-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13px;
    color: var(--color-ink-primary);
}
.chat-confirm-head i { color: var(--gold); font-size: 16px; }
.chat-confirm-note { font-size: 11px; color: var(--color-ink-muted); margin: 3px 0 9px 23px; }
.chat-confirm-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 10px;
    background: var(--color-surface-card);
    border: 1px solid var(--color-border-rule);
    border-radius: 8px;
    margin-bottom: 10px;
}
.chat-confirm-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; }
.ccr-label { flex-shrink: 0; min-width: 64px; color: var(--color-ink-muted); font-weight: 600; }
.ccr-val { color: var(--color-ink-primary); word-break: break-word; }
.chat-confirm-actions { display: flex; gap: 8px; }
.chat-confirm-yes {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 16px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #c9a227 0%, #8b6914 100%);
    color: #fff8e8; font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
    cursor: pointer;
}
.chat-confirm-yes:hover { filter: brightness(1.08); }
.chat-confirm-yes:disabled { opacity: 0.7; cursor: default; }
.chat-confirm-no {
    padding: 7px 14px; border: 1px solid var(--color-border-rule); border-radius: 8px;
    background: var(--color-surface-card); color: var(--color-ink-muted);
    font-family: var(--font-body); font-size: 12.5px; cursor: pointer;
}
.chat-confirm-no:hover { background: var(--color-canvas-secondary); color: var(--color-ink-primary); }
.chat-confirm-status { margin-top: 8px; font-size: 11.5px; }
.chat-confirm-status.error { color: var(--color-danger, #c0392b); }
.chat-confirm-done, .chat-confirm-cancelled {
    display: flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600;
}
.chat-confirm-done { color: #1D5C38; }
.chat-confirm-done i { font-size: 16px; }
.chat-confirm-cancelled { color: var(--color-ink-muted); }
.chat-confirm-cancelled i { font-size: 16px; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .chat-panel { width: 100vw; border-left: none; }
}
