/**
 * pages.css — F2 Extract
 *
 * Page-specific and panel-specific styles: agent execution panel,
 * error response panel, connections panel, session approvals, audit
 * table, skill cards, context pinning, canvas panel, file pills,
 * stop button, automated session indicator, file upload pills, drop
 * overlay, and remaining page-specific overrides.
 *
 * Lines 1274-2386 from original <style> block.
 * Will be split further into per-page files after F3 page extraction.
 */

/* Agent Execution Panel */
#agent-execution-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.agent-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.agent-item:hover {
  background: rgba(22, 104, 227, 0.08);
}

.agent-item:last-child {
  border-bottom: none;
}

.agent-item.expanded {
  background: rgba(22, 104, 227, 0.12);
}

.agent-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.agent-item-name {
  font-weight: 600;
  font-size: 11px;
  color: var(--text);
  flex: 1;
}

.agent-item-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agent-item-status.active {
  background: rgba(15, 159, 110, 0.2);
  color: var(--ok);
}

.agent-item-status.completed {
  background: rgba(22, 104, 227, 0.2);
  color: var(--brand);
}

.agent-item-status.paused {
  background: rgba(209, 75, 75, 0.2);
  color: var(--err);
}

.agent-item-task {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
  word-break: break-word;
}

.agent-item-logs {
  display: none;
  margin-top: 8px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
  font-size: 10px;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--muted);
}

.agent-item.expanded .agent-item-logs {
  display: block;
}

.agent-log-entry {
  margin-bottom: 3px;
}

.agent-log-entry-time {
  color: var(--muted);
  opacity: 0.6;
  margin-right: 6px;
}

.agent-log-entry-type {
  color: var(--brand);
  font-weight: 600;
  margin-right: 6px;
}

.agent-log-entry-content {
  color: var(--text);
}

/* Error Response Panel */
#error-response-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(16, 32, 64, 0.16);
  z-index: 9998;
  max-width: 520px;
  width: 90vw;
  max-height: 80vh;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#error-response-panel.visible {
  display: flex;
}

.error-response-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.error-response-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.error-response-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.error-response-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.error-response-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.error-option-btn {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: all 0.15s ease;
  font-family: 'Manrope', sans-serif;
}

.error-option-btn:hover {
  border-color: var(--brand);
  background: rgba(22, 104, 227, 0.08);
}

.error-option-btn.selected {
  border-color: var(--brand);
  background: rgba(22, 104, 227, 0.15);
  color: var(--brand-2);
}

.error-option-btn.danger {
  border-color: var(--err);
  color: var(--err);
}

.error-option-btn.danger:hover {
  background: rgba(209, 75, 75, 0.1);
}

.error-response-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--panel-2);
  border-radius: 8px;
  display: none;
}

.error-response-inputs.visible {
  display: flex;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
}

.input-field input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.input-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 104, 227, 0.1);
}

.error-response-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.btn-error-submit {
  padding: 8px 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: background 0.15s ease;
}

.btn-error-submit:hover {
  background: var(--brand-2);
}

.btn-error-cancel {
  padding: 8px 14px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: all 0.15s ease;
}

.btn-error-cancel:hover {
  border-color: var(--muted);
}

.right-panel { grid-area: right; display: flex; flex-direction: column; }
.right-section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sys-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sys-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 8px 10px;
  min-height: 62px;
}
.sys-card.full {
  grid-column: 1 / -1;
  min-height: 74px;
}
.sys-k {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Connections Panel ── */
.conn-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  min-height: 74px;
  user-select: none;
}
.conn-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 12px rgba(76,141,255,0.13);
  transform: translateY(-1px);
}
.conn-card.connected {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px rgba(49,184,132,0.25);
}
.conn-card.connected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 900;
  color: var(--ok);
  line-height: 1;
}
.conn-card-logo {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}
.conn-card-name {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Connector detail view permission rows */
.cv-perm-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.cv-perm-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 1px;
}
.cv-btn-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.cv-btn-connect:hover { background: var(--brand-2); transform: translateY(-1px); }
.cv-btn-connect:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.cv-btn-disconnect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--err);
  background: transparent;
  color: var(--err);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  width: fit-content;
}
.cv-btn-disconnect:hover { background: rgba(208,75,75,0.08); }
.cv-activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 11.5px;
}
.cv-activity-dir {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 1px;
}
.cv-activity-dir.in { background: rgba(49,184,132,0.15); color: var(--ok); }
.cv-activity-dir.out { background: rgba(76,141,255,0.15); color: var(--brand); }
.sys-v {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  color: #0d2858;
  letter-spacing: -0.01em;
}
.sys-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}
.sys-meter {
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: #e5edf7;
  overflow: hidden;
}
.sys-meter > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e9d7b 0%, #1b75e6 55%, #0f4fba 100%);
  transition: width 0.35s ease;
}
.info-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #edf2f8; font-size: 12px; }
.info-row:last-child { border-bottom: 0; }
.info-key { color: var(--muted); }
.info-val { color: var(--text); font-weight: 700; }
.info-val.green { color: var(--ok); }
.info-val.red { color: var(--err); }

#approvals-list { max-height: 220px; overflow-y: auto; }
.approval-card { padding: 12px; margin-bottom: 8px; background: #fffaf0; border-color: #f1dbad; }
.approval-action { color: #8b5c00; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.approval-reason { color: #726344; font-size: 11px; line-height: 1.6; margin-bottom: 10px; }
.approval-buttons { display: flex; gap: 8px; }
/* Phase 5 – session approval panel */
#session-approvals-section { display: none !important; }
#session-approvals-list .approval-card { margin-bottom: 0; }
:root[data-theme="dark"] #session-approvals-section { border-color: var(--line); }
:root[data-theme="dark"] #session-approvals-list .approval-card {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
}
/* Phase 5 – audit log table rows */
#audit-table-body tr:hover { background: var(--panel-2); }
:root[data-theme="dark"] #audit-view table thead tr { background: var(--panel-2); }

.skills-search-bar { padding: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; background: var(--panel-2); }
.skill-item { padding: 10px; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.skill-item-name { font-size: 12px; font-weight: 700; color: #14478f; }
.skill-remove-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.skill-remove-btn:hover { color: var(--err); }
.skill-status-row { display:flex; align-items:center; gap:6px; margin-top:4px; flex-wrap: wrap; }
.skill-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f5f8fd;
  color: #4e5f78;
  padding: 2px 7px;
}
.skill-badge.ready { background:#e8fbf3; color:#0f8b63; border-color:#bde9d4; }
.skill-badge.needs_setup { background:#fff6e9; color:#b06b00; border-color:#f0d49e; }
.skill-badge.blocked { background:#fff0f0; color:#c33f3f; border-color:#efc0c0; }
.skill-badge.risk-low { background:#e8fbf3; color:#0f8b63; border-color:#bde9d4; }
.skill-badge.risk-medium { background:#fff6e9; color:#b06b00; border-color:#f0d49e; }
.skill-badge.risk-high { background:#fff0f0; color:#c33f3f; border-color:#efc0c0; }
.skill-item-actions { display:flex; align-items:center; gap:6px; }
.skill-mini-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
}
.skill-mini-btn:hover { border-color:#c1d2ec; color:#26487e; }
.skill-mini-btn.enabled {
  background:#e8fbf3;
  border-color:#bde9d4;
  color:#0f8b63;
}
.skill-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.35);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.skill-modal-card {
  width: min(620px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.skill-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.skill-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.skill-modal-subtitle {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.skill-modal-close-btn,
.skill-modal-secondary-btn {
  background: var(--panel-2) !important;
  color: var(--muted) !important;
  border: 1px solid var(--line) !important;
}
.skill-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skill-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.skill-modal-chip,
.skill-kind-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f8fd;
  color: #4e5f78;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 7px;
  white-space: nowrap;
}
.skill-card > .skill-kind-badge {
  position: absolute;
  top: 10px;
  right: 40px;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skill-modal-chip.bundle,
.skill-kind-badge.bundle {
  background: rgba(49,184,132,0.13);
  border-color: rgba(49,184,132,0.34);
  color: #31b884;
}
.skill-kind-badge.simple {
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.24);
  color: #aeb7c5;
}
.skill-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skill-form-grid {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 3fr);
  gap: 12px;
}
.skill-form-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}
.skill-form-label span {
  font-weight: 500;
  color: var(--muted);
}
.skill-form-input,
.skill-form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: 'Manrope', sans-serif;
  outline: none;
}
.skill-form-input {
  padding: 9px 11px;
}
.skill-form-textarea {
  min-height: 240px;
  padding: 12px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.62;
  resize: vertical;
}
.skill-form-input:focus,
.skill-form-textarea:focus {
  border-color: #a8c7f2;
  box-shadow: 0 0 0 3px rgba(13,79,175,0.08);
}
.skill-modal.readonly .skill-form-input,
.skill-modal.readonly .skill-form-textarea {
  background: #fbfdff;
  cursor: default;
}
.skill-modal.readonly .skill-form-textarea {
  min-height: 300px;
  resize: none;
}
.skill-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}
:root[data-theme="dark"] .skill-modal-card {
  background: var(--panel);
}
:root[data-theme="dark"] .skill-form-input,
:root[data-theme="dark"] .skill-form-textarea,
:root[data-theme="dark"] .skill-modal.readonly .skill-form-input,
:root[data-theme="dark"] .skill-modal.readonly .skill-form-textarea {
  background: var(--panel-2);
}
:root[data-theme="dark"] .skill-modal-chip,
:root[data-theme="dark"] .skill-kind-badge {
  background: rgba(255,255,255,0.06);
}
.skill-details {
  margin: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px;
  display: none;
}
.skill-details.open { display:block; }
.skill-details h4 { font-size: 11px; margin: 0 0 6px; color:#17417f; }
.skill-details .line { font-size: 11px; color: var(--muted); margin: 2px 0; line-height: 1.5; }
.skill-details .line code { color:#10346f; font-family:'IBM Plex Mono', monospace; }
.skill-upload-btn {
  border: 1px solid #bcd4f6;
  background: #ebf3ff;
  color: #0d4faf;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}
.skill-upload-btn:hover { background:#dfeeff; border-color:#a8c7f2; }

/* Skill cards - same color as chat sessions, green glow when enabled */
.skill-card {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  padding: 26px 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.skill-card:hover {
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.skill-card.enabled {
  border-color: #3f8f67;
  background: linear-gradient(135deg, #273b33 0%, #23352e 100%);
  box-shadow: 0 0 0 2px rgba(49,184,132,0.18), 0 2px 8px rgba(10,20,14,0.35);
}
.skill-card.enabled:hover {
  border-color: #4faf80;
  box-shadow: 0 0 0 2px rgba(49,184,132,0.28), 0 4px 12px rgba(10,20,14,0.4);
}
.skill-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 48px;
}
.skill-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f97316;
}
.skill-card.enabled .skill-card-icon {
  background: rgba(249,115,22,0.18);
  border-color: rgba(249,115,22,0.45);
}
/* Pin button — top-right corner */
.skill-card {
  position: relative;
}
.skill-pin-btn {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  opacity: 0.68;
  transition: opacity 0.15s ease, background 0.15s ease;
  padding: 0;
}
.skill-card:hover .skill-pin-btn,
.skill-pin-btn.active {
  opacity: 1;
}
.skill-pin-btn:hover {
  background: rgba(249,115,22,0.10);
  color: #f97316;
}
.skill-pin-btn.active {
  color: #f97316;
}
.skill-card.pinned {
  border-color: rgba(249,115,22,0.45);
  box-shadow: 0 0 0 1px rgba(249,115,22,0.15);
}
.skills-show-more-btn {
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.30);
  color: var(--text);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.skills-show-more-btn:hover {
  background: rgba(249,115,22,0.20);
  border-color: rgba(249,115,22,0.42);
}
.skill-card-info {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}
.skill-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #e8e6e1;
  line-height: 1.3;
}
.skill-card-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.skill-card-name-row .skill-card-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.skill-card.enabled .skill-card-name {
  color: #9fe3c2;
}
.skill-card-desc {
  font-size: 10px;
  color: #9a9890;
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.skill-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 62px;
}

.skill-result { padding: 10px; margin-bottom: 6px; }
.skill-result-name { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.skill-result-desc { font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
.skill-install-btn { background: #ebf3ff; color: #0d4faf; border: 1px solid #bcd4f6; padding: 5px 10px; border-radius: 999px; }

.spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #d2dded;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.pulsing { animation: pulse 1.5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }

/* -- Canvas Panel ------------------------------- */
#canvas-panel { box-shadow: -4px 0 24px rgba(16,32,64,0.08); overflow:hidden; height:100%; min-height:0; }
#canvas-panel.canvas-drag-over { outline: 2px dashed var(--brand); outline-offset: -4px; }
.right-panel-mode-rail,
.canvas-mode-rail {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.right-panel-mode-rail::-webkit-scrollbar,
.canvas-mode-rail::-webkit-scrollbar {
  display: none;
}
.right-panel-mode-rail {
  width: 100%;
}
.canvas-mode-rail {
  justify-content: flex-start;
}
.canvas-mode-rail > * { flex-shrink: 0; }
.canvas-mode-rail { scrollbar-width: thin; }
.canvas-mode-rail::-webkit-scrollbar { display: block; height: 6px; }
.canvas-mode-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.canvas-mode-rail::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.browser-surface-active [data-browser-surface-btn],
#canvas-browser-surface-btn[data-active="true"],
#right-panel-browser-surface-btn[data-active="true"] {
  border-color: rgba(56, 189, 248, 0.34) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #e0f2fe !important;
}
.browser-mode-btn-active,
[data-browser-mode-btn][data-active="true"] {
  border-color: rgba(56, 189, 248, 0.34) !important;
  background: rgba(56, 189, 248, 0.14) !important;
  color: #e0f2fe !important;
}
.canvas-tab {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px 6px 12px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  border-right: 1px solid var(--line); cursor: pointer;
  white-space: nowrap; transition: background 0.12s ease; flex-shrink: 0;
  user-select: none;
}
.canvas-tab:hover { background: #f0f4fb; color: var(--text); }
.canvas-tab.active { background: #fff; color: var(--text); border-bottom: 2px solid var(--brand); }
.canvas-tab-close {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 4px;
  transition: all 0.12s ease;
}
.canvas-tab-close:hover { background: #fee; color: var(--err); }
.canvas-new-tab {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 16px; padding: 4px 12px; flex-shrink: 0;
  transition: color 0.12s ease;
}
.canvas-new-tab:hover { color: var(--brand); }
.canvas-mode-btn.active { background: var(--brand) !important; color: #fff !important; }
#canvas-editor-wrap .CodeMirror {
  height: 100%; font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; line-height: 1.65;
  background: #1e1c1b;
}
#canvas-editor-wrap .CodeMirror-gutters { background: #161413; border-right: 1px solid rgba(255,255,255,0.05); }
#canvas-editor-wrap .CodeMirror-linenumber { color: #6b625b; }
.cm-design-highlight {
  background: rgba(249, 115, 22, 0.22);
  border-bottom: 1px dashed rgba(249, 115, 22, 0.7);
  border-radius: 2px;
}
#canvas-editor-wrap { height: 100%; }
#canvas-preview-frame { background: #fff; }
.canvas-preview-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #9a9890;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  flex-shrink: 0;
}
.canvas-preview-device-btn:hover,
.canvas-preview-device-btn.active {
  border-color: rgba(56,189,248,0.34);
  background: rgba(56,189,248,0.12);
  color: #bae6fd;
}
#canvas-preview-shell[data-device="responsive"] #canvas-preview-stage {
  padding: 0;
}
#canvas-preview-shell:not([data-device="responsive"]) #canvas-preview-stage {
  background:
    radial-gradient(circle at top center, rgba(56,189,248,0.08), transparent 34%),
    linear-gradient(180deg, #1b1917, #11100f);
  justify-content: flex-start;
}
.canvas-tab-dirty::after { content: '\25CF'; color: var(--warn); margin-left: 4px; font-size: 8px; vertical-align: middle; }
.canvas-file-tree-item { display:flex; align-items:center; gap:6px; padding:4px 12px; cursor:pointer; border-radius:6px; color:var(--text); transition:background 0.1s ease; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.canvas-file-tree-item:hover { background:var(--bg-soft); }
.canvas-file-tree-dir { font-weight:700; color:var(--muted); cursor:default; padding:5px 12px 2px; font-size:10px; text-transform:uppercase; letter-spacing:0.05em; }
.canvas-open-btn { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); background:var(--panel-2); color:var(--muted); border-radius:6px; padding:2px 8px; font-size:10px; font-weight:700; cursor:pointer; font-family:'Manrope',sans-serif; transition:all 0.12s ease; }
.canvas-open-btn:hover { background:var(--brand); color:#fff; border-color:var(--brand); }
/* -- File Pills in chat messages -- */
.file-pills { display:flex; flex-direction:column; gap:7px; margin-top:10px; }
.file-pill {
  display:inline-flex; align-items:center; gap:10px;
  border:1px solid var(--line); border-radius:12px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--panel-2), #fff 18%), var(--panel-2));
  overflow:hidden;
  max-width:360px;
  min-height:46px;
  padding:7px 8px;
  box-shadow:0 1px 2px rgba(20,24,32,.05);
  transition:border-color 0.12s ease, box-shadow 0.12s ease;
}
.file-pill:hover { border-color:var(--line-strong); box-shadow:0 5px 18px rgba(20,24,32,.08); }
.file-pill-icon {
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; flex-shrink:0;
  border-radius:9px; color:var(--brand);
  background:rgba(22,104,227,0.06);
}
.file-pill-info { flex:1; min-width:0; padding:0 2px; }
.file-pill-name { font-size:13px; font-weight:800; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.file-pill-meta { font-size:10px; color:var(--muted); margin-top:2px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.file-pill-actions { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.file-pill-btn {
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px; border:1px solid transparent; border-radius:8px; background:transparent;
  color:var(--muted); cursor:pointer; transition:all 0.12s ease;
  font-family:inherit;
}
.file-pill-btn:hover { background:var(--brand); color:#fff; border-color:var(--brand); }
.file-pill-btn + .file-pill-btn { border-left:0; }
:root[data-theme="dark"] .file-pill { background:var(--panel); border-color:var(--line); box-shadow:none; }
:root[data-theme="dark"] .file-pill-icon { background:rgba(76,141,255,0.1); }
:root[data-theme="dark"] .canvas-tab.active { background: var(--panel); }
:root[data-theme="dark"] .canvas-tab:hover { background: var(--panel-2); }

.assistant-image-gallery {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 12px;
  max-width: 100%;
}

.assistant-image-card {
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  max-width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
    var(--panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.assistant-image-card--multi {
  max-width: min(100%, 540px);
}

.assistant-image-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.assistant-image-stage--multi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  width: 100%;
}

.assistant-image-preview {
  display: inline-block;
  width: auto;
  max-width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at top, rgba(22, 104, 227, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(243, 247, 255, 0.92), rgba(255, 255, 255, 0.98));
  transition: transform 0.16s ease, filter 0.16s ease;
}

.assistant-image-preview:hover {
  filter: saturate(1.03);
}

.assistant-image-preview--static {
  cursor: default;
}

.assistant-image-preview img {
  display: block;
  width: auto;
  max-width: min(100%, 380px);
  max-height: 300px;
  height: auto;
  object-fit: contain;
}

.assistant-image-card--multi .assistant-image-preview {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(22, 104, 227, 0.08);
}

.assistant-image-card--multi .assistant-image-preview img {
  max-width: min(100%, 420px);
}

.assistant-generated-video {
  width: 100%;
  max-width: min(100%, 460px);
  max-height: 420px;
  display: block;
  background: #050816;
  border-radius: 12px;
  object-fit: contain;
}

.assistant-image-thumb-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assistant-image-thumb {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.16s ease;
}

.assistant-image-thumb:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.assistant-image-thumb.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 104, 227, 0.14);
}

.assistant-image-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assistant-image-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(22, 104, 227, 0.08);
}

.assistant-image-meta {
  min-width: 0;
  flex: 1 1 0;
}

.assistant-image-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.assistant-image-subtitle {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  word-break: normal;
  overflow-wrap: anywhere;
}

.assistant-image-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

.assistant-image-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.assistant-image-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.assistant-image-btn--primary {
  border-color: rgba(22, 104, 227, 0.18);
  background: rgba(22, 104, 227, 0.08);
  color: var(--brand);
}

:root[data-theme="dark"] .assistant-image-card {
  background:
    linear-gradient(180deg, rgba(22, 27, 34, 0.98), rgba(17, 22, 29, 0.96)),
    var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .assistant-image-preview {
  background:
    radial-gradient(circle at top, rgba(76, 141, 255, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(20, 26, 35, 0.96), rgba(16, 21, 29, 0.98));
}

:root[data-theme="dark"] .assistant-image-card--multi .assistant-image-preview {
  border-color: rgba(76, 141, 255, 0.12);
}

:root[data-theme="dark"] .assistant-image-footer {
  border-top-color: rgba(76, 141, 255, 0.12);
}

:root[data-theme="dark"] .assistant-image-btn {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 720px) {
  .assistant-image-gallery {
    max-width: 100%;
  }

  .assistant-image-stage--multi {
    grid-template-columns: 1fr;
  }

  .assistant-image-thumb-rail {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .assistant-image-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-image-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.memory-page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    radial-gradient(680px 340px at 0% 0%, rgba(27, 94, 212, 0.1), transparent 62%),
    radial-gradient(720px 360px at 100% 100%, rgba(24, 164, 206, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 255, 0.94));
}

.memory-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.memory-page-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.memory-page-subtitle {
  margin-top: 4px;
  max-width: 760px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.memory-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-action-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: 'Manrope', sans-serif;
}

.memory-action-btn--primary {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.12);
  color: var(--brand);
}

.memory-action-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.memory-page-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.memory-graph-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  height: 100%;
}

.memory-graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 6;
  pointer-events: none;
}

.memory-search-input {
  flex: 1 1 520px;
  min-width: 220px;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 10px 14px;
  font-size: 12px;
  outline: none;
  font-family: 'Manrope', sans-serif;
  pointer-events: auto;
}

.memory-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 227, 0.08);
}

.memory-graph-stats {
  font-size: 11px;
  color: var(--muted);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  pointer-events: auto;
}

.memory-graph-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #0a1626 44%, #0d1a2b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(7, 17, 31, 0.12);
}

.memory-graph-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.memory-graph-stage canvas.is-dragging {
  cursor: grabbing;
}

.memory-graph-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 237, 246, 0.82);
  font-size: 13px;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.memory-drop-overlay {
  position: absolute;
  inset: 22px;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(238, 244, 255, 0.9);
  font-size: 16px;
  font-weight: 700;
  background: rgba(7, 17, 31, 0.62);
  backdrop-filter: blur(8px);
  z-index: 6;
  pointer-events: none;
}

.memory-graph-tooltip {
  position: absolute;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(8, 16, 29, 0.92);
  backdrop-filter: blur(10px);
  color: #eef4ff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 4;
}

.memory-graph-tooltip strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.memory-graph-tooltip .meta {
  font-size: 10px;
  opacity: 0.72;
  margin-bottom: 6px;
}

.memory-graph-tooltip .body {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(238, 244, 255, 0.88);
}

.memory-side-panel {
  position: absolute;
  right: 20px;
  bottom: 20px;
  top: 116px;
  width: min(340px, calc(100% - 40px));
  z-index: 7;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 16px 36px rgba(10, 24, 43, 0.2);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.memory-side-panel.collapsed {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.memory-side-panel-header,
.memory-detail-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memory-side-panel-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.memory-panel-collapse-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.memory-panel-collapse-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.memory-controls-fab {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 16, 29, 0.92);
  color: #eef4ff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  z-index: 8;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.memory-controls-fab:hover {
  transform: translateY(-1px);
}

.memory-detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 34%);
  z-index: 8;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 24px 0 0 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: -8px 0 32px rgba(10, 24, 43, 0.18);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.memory-panel-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
  box-shadow: 0 10px 24px rgba(16, 32, 64, 0.06);
}

.memory-panel-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.memory-control-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.memory-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.memory-control span {
  font-weight: 700;
}

.memory-control select,
.memory-control input[type="range"] {
  width: 100%;
}

.memory-control select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 10px;
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
}

.memory-control-hint {
  font-size: 11px;
  color: var(--muted);
}

.memory-check {
  flex-direction: row;
  align-items: center;
}

.memory-check input {
  accent-color: var(--brand);
}

.memory-detail-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.memory-detail-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.memory-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.memory-detail-heading h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.memory-detail-chip {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  background: rgba(22, 104, 227, 0.08);
}

.memory-detail-meta {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px 12px;
}

.memory-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.memory-detail-meta div {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.memory-detail-meta strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.memory-detail-summary {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  background: rgba(22, 104, 227, 0.06);
  border: 1px solid rgba(22, 104, 227, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
}

.memory-detail-summary p {
  margin: 0 0 10px;
}

.memory-detail-summary p:last-child {
  margin-bottom: 0;
}

.memory-detail-empty-inline {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.memory-detail-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  padding-left: 10px;
  border-left: 2px solid var(--brand);
  opacity: 0.72;
}

.memory-compose-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.memory-compose-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.memory-compose-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.memory-compose-input,
.memory-compose-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 11px 12px;
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
  outline: none;
}

.memory-compose-input:focus,
.memory-compose-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.memory-compose-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.memory-compose-help {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.memory-compose-dropzone {
  border: 1px dashed rgba(249, 115, 22, 0.34);
  border-radius: 16px;
  background: rgba(249, 115, 22, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-compose-dropzone strong {
  font-size: 12px;
  color: var(--text);
}

.memory-compose-file-picker {
  align-self: flex-start;
  border: 1px solid rgba(249, 115, 22, 0.24);
  background: rgba(249, 115, 22, 0.14);
  color: var(--brand);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.memory-compose-file-list,
.memory-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-compose-file-item,
.memory-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px 12px;
}

.memory-compose-file-meta,
.memory-attachment-meta {
  min-width: 0;
}

.memory-compose-file-meta strong,
.memory-attachment-meta strong {
  display: block;
  font-size: 12px;
  color: var(--text);
  word-break: break-word;
}

.memory-compose-file-meta span,
.memory-attachment-meta span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

.memory-compose-file-remove,
.memory-attachment-open {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.memory-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.memory-compose-submit {
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: var(--brand);
  color: #fff7ed;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.memory-compose-submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.memory-detail-chunk {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(22, 104, 227, 0.14);
  border-left: 3px solid rgba(249, 115, 22, 0.42);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Manrope', sans-serif;
}

.memory-detail-chunk p {
  margin: 0 0 8px;
}

.memory-detail-chunk p:last-child {
  margin-bottom: 0;
}

.memory-related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-related-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.memory-related-item:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.memory-related-item strong {
  display: block;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 3px;
}

.memory-related-item .meta {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}

.memory-related-item .body {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

:root[data-theme="dark"] .memory-page-shell {
  background:
    radial-gradient(680px 340px at 0% 0%, rgba(76, 141, 255, 0.14), transparent 62%),
    radial-gradient(720px 360px at 100% 100%, rgba(61, 183, 255, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(36, 43, 54, 0.95), rgba(32, 38, 48, 0.98));
}

:root[data-theme="dark"] .memory-side-panel,
:root[data-theme="dark"] .memory-panel-card,
:root[data-theme="dark"] .memory-search-input,
:root[data-theme="dark"] .memory-graph-stats,
:root[data-theme="dark"] .memory-detail-drawer {
  background: rgba(42, 49, 61, 0.82);
}

:root[data-theme="dark"] .memory-detail-summary {
  background: rgba(76, 141, 255, 0.09);
  border-color: rgba(76, 141, 255, 0.22);
}

:root[data-theme="dark"] .memory-detail-meta,
:root[data-theme="dark"] .memory-related-item,
:root[data-theme="dark"] .memory-control select,
:root[data-theme="dark"] .memory-action-btn,
:root[data-theme="dark"] .memory-panel-collapse-btn {
  background: var(--panel);
}

:root[data-theme="dark"] .memory-compose-input,
:root[data-theme="dark"] .memory-compose-textarea,
:root[data-theme="dark"] .memory-compose-file-item,
:root[data-theme="dark"] .memory-attachment-item,
:root[data-theme="dark"] .memory-compose-file-remove,
:root[data-theme="dark"] .memory-attachment-open {
  background: var(--panel);
}

:root[data-theme="dark"] .memory-detail-chunk {
  background: rgba(0, 0, 0, 0.22);
  border-color: var(--line);
  border-left-color: var(--line-strong);
}
/* -- Stop Button ---------------------------------- */
.send-btn { transition: background 0.15s ease !important; display: flex; align-items: center; justify-content: center; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd7e8; border-radius: 999px; }

@media (max-width: 1200px) {
  body {
    grid-template-columns: 250px 1fr;
    grid-template-areas:
      "header header"
      "main right";
  }
  aside { display: none; }
}

@media (max-width: 900px) {
  body {
    padding: 8px;
    gap: 8px;
    grid-template-rows: 58px 1fr 280px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "right";
  }
  header { border-radius: 14px; }
  .status-bar { display: none; }
  #chat-messages,
  #main-content { padding: 14px; }
  .mission-bar { padding: 10px; }
  .chat-input-area { bottom: 12px; width: calc(100% - 24px); border-radius: 14px; }
  .memory-side-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 52%;
    padding: 12px;
    border-radius: 18px;
  }
  .memory-detail-drawer {
    top: 0;
    left: 10px;
    right: 0;
    bottom: 0;
    width: auto;
    border-radius: 18px 0 0 18px;
    border-right: none;
  }
  .memory-controls-fab {
    right: 14px;
    bottom: 14px;
  }
  .memory-graph-toolbar {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }
  .memory-search-input {
    flex-basis: 100%;
    max-width: none;
  }
}
/* Automated session indicator in sidebar */
.session-auto-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; color: #c77d00; background: #fff8e7;
  border: 1px solid #f0dfa0; border-radius: 4px;
  padding: 1px 5px; font-weight: 700;
}
.session-auto-badge.tele {
  color: #0f4ea8;
  background: #eaf3ff;
  border-color: #b8d4ff;
}

/* Error Response Panel - Inline Styling */
.error-response-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
  margin: 12px 0;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-header {
  margin-bottom: 16px;
}

.error-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.error-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.error-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.error-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  white-space: normal;
}

.error-option-btn:hover:not(.danger):not(:disabled) {
  background: rgba(22, 104, 227, 0.08);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.error-option-btn:active:not(.danger):not(:disabled) {
  transform: translateY(0);
}

.error-option-btn.danger {
  border-color: var(--err);
  color: var(--err);
}

.error-option-btn.danger:hover {
  background: rgba(209, 75, 75, 0.1);
}

.error-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-inputs {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  padding-top: 0;
  border-top: 1px solid var(--line);
}

.error-inputs.visible {
  display: flex;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.input-field input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: var(--panel-2);
  color: var(--text);
  transition: all 0.2s ease;
}

.input-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 227, 0.1);
}

.continue-btn {
  padding: 10px 16px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.continue-btn:hover {
  background: #0f4ac9;
  transform: translateY(-1px);
}

.continue-btn:active {
  transform: translateY(0);
}

.continue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-context {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.error-context-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
}

.error-context-detail {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
  border-left: 3px solid var(--muted);
  font-size: 12px;
  color: var(--muted);
  font-family: 'Monaco', 'Courier New', monospace;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-context-detail.visible {
  display: block;
}
/* ── File upload pill styles ─────────────────────────────────────────── */
.chat-file-staging {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 0;
  margin: 0 0 6px 0;
}
.chat-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2, #f0f0f0);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: 220px;
  cursor: default;
  position: relative;
}
.chat-file-pill .pill-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.chat-file-pill .pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.chat-file-pill .pill-ext {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--brand, #6c8ebf);
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.chat-file-pill .pill-remove {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.chat-file-pill .pill-remove:hover { background: var(--line); color: var(--text); }
:root[data-theme="dark"] .chat-file-pill {
  background: #2c3442;
  border-color: #3d4a5c;
}

/* ── Uploaded image thumbnails in chat bubbles ── */
.msg-img-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.msg-img-thumb:hover {
  transform: scale(1.09);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}

/* ── Image preview modal ── */
.img-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: imgOverlayIn 0.15s ease;
  cursor: zoom-out;
}
@keyframes imgOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.img-preview-box {
  position: relative;
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: imgBoxIn 0.18s cubic-bezier(0.34,1.56,0.64,1);
  cursor: default;
}
@keyframes imgBoxIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.img-preview-box img {
  max-width: 88vw;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 16px 60px rgba(0,0,0,0.55);
  display: block;
}
.img-preview-name {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  text-align: center;
  max-width: 88vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.img-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.img-preview-close:hover { background: rgba(255,255,255,0.28); }

.chat-attach-btn,
.chat-voice-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2, #f5f5f5);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  will-change: transform;
  transition: background 0.15s, color 0.15s;
}
.chat-attach-btn > svg,
.chat-voice-btn > svg,
.chat-attach-btn > iconify-icon,
.chat-voice-btn > iconify-icon {
  display: block;
  width: 15px;
  height: 15px;
}
.chat-voice-btn > .voice-btn-icon[hidden] {
  display: none;
}
.chat-voice-btn[data-voice-mode="openai_realtime"] > iconify-icon {
  transform: translateX(0.5px);
}
.chat-attach-btn:hover,
.chat-voice-btn:hover { background: var(--line); color: var(--text); }
.chat-voice-btn.recording {
  border-color: rgba(239,68,68,0.45);
  background: rgba(239,68,68,0.12);
  color: var(--err);
}
.chat-voice-btn.active {
  border-color: rgba(22,163,74,0.45);
  background: rgba(22,163,74,0.12);
  color: var(--ok);
}
.chat-voice-btn.silent {
  border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.14);
  color: #b45309;
}
.chat-voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
:root[data-theme="dark"] .chat-attach-btn,
:root[data-theme="dark"] .chat-voice-btn { background: #2c3442; }
.voice-provider-controls {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  vertical-align: middle;
}
.voice-provider-controls.visible {
  display: inline-flex;
}
.voice-provider-controls [hidden],
.voice-provider-controls label[hidden] {
  display: none !important;
}
.voice-provider-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.voice-provider-controls select {
  max-width: 110px;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2, #f5f5f5);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  padding: 2px 18px 2px 6px;
}
.realtime-wake-gate-status {
  display: none;
  align-items: center;
  gap: 4px;
}
.realtime-wake-gate-status.visible {
  display: inline-flex;
}
.realtime-wake-gate-pill {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(245,158,11,0.34);
  border-radius: 999px;
  background: rgba(245,158,11,0.1);
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
}
.realtime-wake-gate-btn {
  border: 1px solid rgba(22,163,74,0.36);
  border-radius: 7px;
  background: rgba(22,163,74,0.1);
  color: var(--ok);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  min-height: 22px;
  padding: 2px 7px;
}
.realtime-wake-gate-btn:hover {
  background: rgba(22,163,74,0.18);
}
@media (max-width: 760px) {
  .voice-provider-controls.visible {
    display: flex;
    width: 100%;
    margin: 6px 0 0;
  }
}
/* Drop overlay */
#chat-view.drag-over::after {
  content: 'Drop files here';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--brand, #6c8ebf) 15%, transparent);
  border: 2px dashed var(--brand, #6c8ebf);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand, #6c8ebf);
  z-index: 10;
  pointer-events: none;
}
#chat-view { position: relative; overflow: hidden; }

.panel-chat-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.panel-chat-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-bottom: 1px;
}

.panel-chat-file-staging {
  max-height: 82px;
  overflow-y: auto;
  padding-top: 0;
}

.team-chat-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.team-chat-attachment-thumb,
.team-chat-attachment-file {
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: inherit;
  cursor: zoom-in;
  padding: 0;
  font: inherit;
}

.team-chat-attachment-thumb {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
}

.team-chat-attachment-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.team-chat-attachment-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 7px;
  max-width: 220px;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
}

.team-chat-attachment-file span {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 18px;
}

.team-chat-attachment-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.team-chat-attachment-file em {
  font-style: normal;
  font-size: 9px;
  opacity: 0.7;
  text-transform: uppercase;
}

.team-chat-attachment-thumb:hover,
.team-chat-attachment-file:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}

.panel-attachment-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--panel) 94%, rgba(0,0,0,0.74));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 18px 18px;
}

.panel-attachment-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.panel-attachment-preview-body {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
}

.panel-attachment-preview-body img {
  max-width: 100%;
  max-height: calc(100% - 28px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 14px 44px rgba(0,0,0,0.28);
}

.panel-attachment-preview-body pre {
  width: 100%;
  height: 100%;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
}

.panel-attachment-preview-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.panel-attachment-preview-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(420px, 90%);
  text-align: center;
  color: var(--muted);
}

.panel-attachment-preview-file div {
  font-size: 42px;
}

.panel-attachment-preview-file strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.panel-attachment-preview-file span {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.panel-attachment-preview-file button {
  border: 1px solid var(--line);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.team-chat-drag-over::after {
  content: 'Drop files here';
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--brand);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}
