/* Console chatting : conversation ouverte, saisie, modale système ; suite de chatting.css, chargée juste après (20/11, même cascade). */
/* Chat panel */
.chat-panel { flex: 1; min-width: 0; background: var(--bg-chat); border: 1px solid var(--border); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 3px 14px rgba(40,38,34,0.035); }
.chat-header {
  min-height: 56px; background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 14px; margin: 8px 8px 0;
  padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
}
.chat-header-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-title { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 650; }
.chat-title .user { font-size: 12.5px; color: var(--text-dim); font-weight: 400; }
.chat-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.status-pill { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.status-pill.waiting { background: var(--red-soft); color: var(--red); }
.status-pill.handled { background: var(--green-soft); color: var(--green); }
/* Ce que fait l'IA quand le prospect attend et qu'il n'y a pas encore de suggestion */
.status-pill.ia-generating, .ia-pill.ia-generating { background: var(--accent-soft); color: var(--accent); }
.status-pill.ia-pending, .ia-pill.ia-pending, .status-pill.ia-none, .ia-pill.ia-none { background: var(--bg-card-hover); color: var(--text-muted); }
.status-pill.ia-failed, .ia-pill.ia-failed { background: var(--orange-soft); color: var(--orange); }
.ia-pill { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; white-space: nowrap; }
.ia-generating { animation: generating-pulse 2.4s ease-in-out infinite; }
@keyframes generating-pulse { 50% { opacity: .65; } }
.ai-banner { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 9px; font-size: 13px; background: var(--accent-soft); color: var(--text-main); }
.ai-banner.failed { background: var(--orange-soft); }
.ai-banner.pending { background: var(--bg-card-hover); color: var(--text-muted); }
/* AI at work: a small « typing… » bubble like the client's, not a system banner (04/11) */
.ai-banner.generating, .ai-banner.pending { align-self: flex-start; justify-self: start; width: fit-content; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 16px 16px 16px 5px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.ai-banner.generating::before, .ai-banner.pending::before { content: "✦"; font-size: 13px; }
.ai-banner.pending { color: var(--text-muted); }
.ai-typing { display: inline-flex; gap: 3px; order: 2; }
.ai-typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: ai-dot 1.2s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
/* AI draft not yet edited: tinted outline, so it is read before sending */
/* Conversation pas encore chargée : header de la liste, le reste attend la réponse */
.detail-pending .chat-meta, .detail-pending #chat-client-presence, .detail-pending .copilot-zone, .detail-pending .chat-tools, .detail-pending .mobile-history { visibility: hidden; }
.copilot-textarea.ai-draft { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--composer-input-bg)); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex-shrink: 0; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .ia-generating, .tab-badge.bump, .ai-typing i { animation: none; } }
.local-times { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.local-times b { color: var(--text-main); font-weight: 650; }
.local-times select { height: 22px; font-size: 11.5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text-muted); padding: 0 4px; }
.tab-badge.bump { animation: bump .5s ease-in-out 3; }
@keyframes bump { 50% { transform: scale(1.25); box-shadow: 0 0 0 3px var(--red-soft); } }
.badge-etape-select {
  height: 24px; font-size: 12px; font-weight: 550; padding: 0 6px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); cursor: pointer;
}
.badge-etape-select option { text-transform: none; }
.etape-saved-pill { font-size: 11.5px; color: var(--green); font-weight: 600; }
.chat-tools { display: flex; align-items: center; gap: 4px; }
/* recherche dans la conversation ouverte (19/11) */
.find-bar { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.find-bar[hidden] { display: none; }
.find-bar input { flex: 1; min-width: 0; min-height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text-main); }
#find-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
mark.find { background: #ffe58a; color: inherit; border-radius: 3px; }
mark.find.now { background: #ffb347; outline: 2px solid #e08a00; }
.link-btn {
  background: transparent; border: none; color: var(--text-muted); font-size: 12.5px;
  padding: 5px 8px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.link-btn:hover { background: var(--bg-card-hover); color: var(--text-main); }
#history-state { font-size: 12px; color: var(--text-dim); }
#history-state:empty { display: none; }

.chat-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.message-day { display: flex; flex-direction: column; gap: inherit; flex-shrink: 0; }
.date-sep {
  position: sticky; top: 0; z-index: 2; flex-shrink: 0;
  align-self: center; background: var(--bg-card); border: 1px solid var(--border);
  padding: 2px 12px; border-radius: 12px; font-size: 11.5px; color: var(--text-muted); font-weight: 550; margin: 10px 0 6px;
}
.msg {
  max-width: min(68%, 620px); display: flex; flex-direction: column; gap: 3px;
  padding: 8px 12px 6px; border-radius: 14px; font-size: 14.5px; line-height: 1.45;
  word-break: break-word; box-shadow: var(--shadow-bubble);
}
.msg.lui { align-self: flex-start; background: var(--bubble-in); color: var(--bubble-in-text); border-bottom-left-radius: 4px; }
.msg.nous { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-text); border-bottom-right-radius: 4px; }
.msg-author { display: none; }
.msg-time { align-self: flex-end; font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.msg-time .message-operator { font-size: 10.5px; font-weight: 500; color: var(--text-dim); }
/* Qui a ecrit le message envoye */
.origin { font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 0 6px; border-radius: 6px; line-height: 16px; cursor: help; background: color-mix(in srgb, var(--text-dim) 16%, transparent); color: var(--text-muted); }
.origin.ai { background: var(--accent-soft); color: var(--accent); }
.origin.ai_edited { background: var(--violet-soft); color: var(--violet); }
button.origin { border: none; font-family: inherit; cursor: pointer; }
button.origin:hover { filter: brightness(.95); text-decoration: underline; }
.ai-original { margin-top: 6px; padding: 7px 9px; border-radius: 8px; border-left: 3px solid var(--violet); background: color-mix(in srgb, var(--violet-soft) 70%, var(--bg-card)); font-size: 12.5px; color: var(--text-muted); white-space: pre-wrap; }
.ai-original b { display: block; font-size: 11px; color: var(--violet); margin-bottom: 3px; }
.origin.followup { background: var(--teal-soft); color: var(--teal); }
.origin.telegram { background: var(--yellow-soft); color: var(--yellow); }
.msg-ticks { color: var(--accent); font-size: 11px; }
.msg .feedback-note { opacity: 0; transition: opacity .12s; padding: 0 6px; font-size: 11px; height: 18px; }
.msg:hover .feedback-note, .msg .feedback-note:focus-visible { opacity: 1; }
.msg-img { max-width: 280px; max-height: 220px; border-radius: 8px; margin-top: 4px; display: block; cursor: zoom-in; }
.tg-media { position: relative; width: 220px; max-width: 100%; min-height: 64px; margin-top: 4px; border-radius: 8px; overflow: hidden; background: rgba(127,127,127,.15); }
.tg-media .tg-thumb { display: block; width: 100%; filter: blur(6px); transform: scale(1.08); }
.tg-media .tg-load { position: absolute; inset: 0; margin: auto; height: fit-content; width: fit-content; max-width: 90%; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.tg-media .tg-load:disabled { cursor: progress; opacity: .85; }
.msg audio, .msg video { margin-top: 4px; max-width: 100%; }
.msg a { color: var(--accent); }

.img-lightbox {
  position: fixed; inset: 0; background: rgba(20,20,22,0.82); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.img-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; object-fit: contain; cursor: default; }
.lightbox-close { position: absolute; top: 14px; right: 24px; font-size: 32px; color: #fff; cursor: pointer; opacity: .8; }

/* Composer */
.copilot-zone {
  background: var(--composer-bg); border: 1px solid var(--border); border-radius: 16px; margin: 0 8px 8px; box-shadow: 0 4px 16px rgba(40,38,34,0.05);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
  max-height: 55vh; overflow-y: auto;
}
.copilot-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-pill { display: none; }
.draft-switch { box-sizing: border-box; display: inline-flex; gap: 2px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-app); }
.draft-switch[hidden] { display: none; }
.draft-switch button { display: inline-flex; align-items: center; border: 0; background: none; padding: 0 10px; border-radius: 6px; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.draft-switch button[aria-pressed="true"] { background: var(--bg-card); color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.draft-switch button:disabled { opacity: .5; cursor: default; }
.draft-switch button.new::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--accent); vertical-align: 1px; animation: ai-new-pulse 1.8s ease-in-out infinite; }
@keyframes ai-new-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); transform: scale(1); }
  40% { transform: scale(1.15); }
  70%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .draft-switch button.new::after { animation: none; } }
#ai-menu-btn { margin-left: auto; }
.composer-attachments { flex-wrap: wrap; }
.composer-menu-btn.warn::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: #d9822b; }
/* Tool row under the text (04/11): light icons, no frames ; the My text | AI switch keeps its frame */
.composer-attachments > .btn-tool { border-color: transparent; background: transparent; color: var(--text-muted); }
.composer-attachments > .btn-tool:hover:not(:disabled), .composer-attachments > .btn-tool[aria-expanded="true"] { border-color: transparent; background: var(--bg-card-hover); color: var(--text-main); }
.composer-attachments > :is(#photo-select, #emoji-select, #more-menu-btn) { width: 34px; padding: 0; justify-content: center; font-size: 17px; }
.composer-attachments > #photo-select svg.i { width: 18px; height: 18px; }
.composer-attachments > #ai-menu-btn { color: var(--accent); font-weight: 650; }
.composer-menu { position: fixed; inset: auto; margin: 0; width: min(340px, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); color: var(--text-main); box-shadow: var(--shadow-pop); }
.composer-menu:popover-open { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.composer-menu > button { justify-content: flex-start; }
.composer-menu .instruction-row { display: flex; }
.composer-menu .instruction-input { flex: 1; min-width: 0; }
.composer-menu #btn-toggle-instruction { display: none; }
.composer-menu select { width: 100%; }
.composer-attachments #action-status { flex: 0 1 auto; min-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-muted); }
.composer-attachments #action-status:hover { white-space: normal; }
.composer-menu-btn { flex-shrink: 0; }
.composer-menu #btn-add-note:disabled, #more-menu:has(#btn-add-note:disabled) #feedback-version { display: none; }
.composer-attachments #ai-explanation, .composer-attachments #ai-explanation[open] { position: relative; margin-left: 0; flex-basis: auto; font-size: 12px; white-space: nowrap; }
.composer-attachments #ai-explanation p { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; width: min(380px, 70vw); white-space: normal; box-shadow: var(--shadow-pop); }
.copilot-head:not(:has(.copilot-alerts:not(:empty))), #draft-context, #draft-state { display: none; }
.composer-menu .brain-report-button { margin: 0; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border); font-size: 12.5px; font-weight: 550; }
.composer-menu [hidden] { display: none !important; }
.copilot-alerts { display: flex; gap: 6px; flex-wrap: wrap; }
.copilot-alerts:empty { display: none; }
.alert-chip { font-size: 11.5px; padding: 1px 8px; border-radius: 10px; background: var(--yellow-soft); color: var(--yellow); font-weight: 550; }
.alert-chip.info { background: var(--accent-soft); color: var(--accent); }
#ai-explanation { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
#ai-explanation summary { cursor: pointer; list-style: none; }
#ai-explanation summary::-webkit-details-marker { display: none; }
#ai-explanation[open] { flex-basis: 100%; margin-left: 0; }
#ai-explanation p { margin-top: 4px; padding: 8px 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
#action-status { font-size: 12.5px; color: var(--text-muted); }
#action-status:empty { display: none; }
#draft-conflict {
  background: var(--yellow-soft); color: var(--yellow); border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
#draft-conflict p { flex: 1; min-width: 200px; }

.composer-box { display: flex; flex-direction: column; gap: 6px; }
.drop-ready { outline: 2px dashed #3b82f6; outline-offset: -4px; border-radius: 12px; background: rgba(59,130,246,.06); }
.copilot-textarea {
  width: 100%; min-height: 76px; max-height: 240px; background: var(--composer-input-bg);
  border: 1px solid var(--composer-input-border); border-radius: 13px;
  padding: 10px 12px; font-size: 14.5px; line-height: 1.5; resize: vertical; outline: none;
}
.copilot-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.copilot-textarea:disabled { opacity: .6; }
.instruction-row { display: none; gap: 8px; align-items: center; }
.instruction-row.open { display: flex; }
.instruction-input {
  flex: 1; background: var(--composer-input-bg); border: 1px solid var(--composer-input-border);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; min-width: 0;
}
.instruction-input:focus { border-color: var(--accent); }

.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.composer-notes { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.composer-notes #feedback-version { max-width: 180px; min-width: 0; }
.composer-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px; padding-top: 2px; }
.composer-support { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.composer-attachments { display: flex; align-items: center; gap: 6px; }

.composer-bottom > .btn-send { align-self: start; }
@media (max-width: 700px) {
  .composer-notes { margin-left: 0; }
  .composer-bottom { gap: 12px; }
  .composer-bottom > .btn-send { padding: 0 10px; }
}

.copilot-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn-tool, .btn-regen {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main);
  font-size: 12.5px; font-weight: 550; height: 32px; padding: 0 11px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-tool:hover:not(:disabled), .btn-regen:hover:not(:disabled) { border-color: var(--border-strong); background: var(--bg-card-hover); }
.btn-primary-soft { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary-soft:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-send {
  background: color-mix(in srgb, var(--acc, var(--send)) 92%, #000000); border: none; color: var(--send-ink, #ffffff); font-size: 13.5px; font-weight: 650;
  height: 34px; padding: 0 16px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.btn-send:hover:not(:disabled) { background: color-mix(in srgb, var(--acc, var(--send)) 84%, #000000); }
#feedback-version {
  height: 32px; max-width: 260px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-card); color: var(--text-muted); font-size: 12px; padding: 0 6px;
}
kbd {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font: 10.5px ui-monospace, Menlo, monospace; color: var(--text-muted);
}
.shortcut-tip { font-size: 11.5px; color: var(--text-dim); }

.composer-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.chip {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted);
  font-size: 12px; padding: 2px 10px; border-radius: 12px; cursor: pointer;
}
.chip:hover:not(:disabled) { color: var(--text-main); border-color: var(--border-strong); background: var(--bg-card); }
.foot-sep { width: 1px; height: 16px; background: var(--border); margin: 0 6px; }
.foot-details { font-size: 12.5px; }
.foot-details > summary { cursor: pointer; color: var(--text-muted); padding: 2px 4px; border-radius: 6px; }
.foot-details > summary:hover { color: var(--text-main); }
.foot-details[open] { flex-basis: 100%; order: 10; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.foot-details[open] > summary { margin-bottom: 8px; color: var(--text-main); font-weight: 600; }
.send-preview-content { max-height: min(180px, 22vh); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.send-preview-content .msg { max-width: 100%; align-self: stretch; }
#human-actions label { display: flex; align-items: center; gap: 6px; }
#human-actions fieldset { margin: 8px 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
#human-actions legend { padding: 0 4px; font-weight: 600; font-size: 12px; }
#human-actions p { color: var(--text-muted); margin: 6px 0; }
#human-actions .check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 12px; }
#human-actions input[type=checkbox] { accent-color: var(--accent); }
#human-actions .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.empty-view {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-dim); gap: 10px; text-align: center; padding: 30px;
}
.empty-view svg { width: 40px; height: 40px; opacity: .5; }
.list-empty { padding: 40px 16px; text-align: center; color: var(--text-dim); font-size: 13px; line-height: 1.5; }

/* System modal */
.system-modal-backdrop { position: fixed; inset: 0; background: rgba(20,20,22,0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.system-modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 720px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); overflow: hidden; }
.system-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.system-modal-header h3 { font-size: 14.5px; font-weight: 650; }
.modal-close-btn { background: transparent; border: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.modal-close-btn:hover { background: var(--bg-card-hover); color: var(--text-main); }
.system-modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.system-status-card { border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.system-status-card.error { background: var(--red-soft); }
.system-status-card.ok { background: var(--green-soft); }
.status-card-header { display: flex; align-items: center; justify-content: space-between; }
.status-badge { font-size: 12px; font-weight: 650; }
.status-badge.error { color: var(--red); }
.status-badge.ok { color: var(--green); }
.status-error-title { font-size: 13.5px; font-weight: 650; color: var(--red); }
.status-error-msg { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-card); padding: 8px 10px; border-radius: 6px; word-break: break-word; }
.system-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.system-info-item { background: var(--bg-app); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.info-label { font-size: 11.5px; color: var(--text-muted); font-weight: 550; }
.info-value { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.code-font { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.system-actions-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-action { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); }
.btn-action.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.system-logs-section { display: flex; flex-direction: column; gap: 6px; }
.logs-header { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.logs-terminal { background: var(--bg-app); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; height: 220px; overflow-y: auto; font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-muted); white-space: pre-wrap; }

@media (max-width: 1250px) {
  .app-header { height: auto; padding: 10px 16px; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .brand { grid-column: 1 / -1; grid-row: 1; }
  .header-tabs, .header-right { grid-row: 2; }
}
@media (max-width: 900px) {
  .app-header { grid-template-columns: minmax(0, 1fr); }
  .header-tabs { justify-self: center; max-width: 100%; overflow-x: auto; padding: 3px; }
  .header-right { grid-row: 3; justify-self: center; }
}
@media (max-width: 1100px) {
  .sidebar { width: 280px; }
  .shortcut-tip { display: none; }
  .header-tabs { gap: 4px; }
  .tab-btn { padding: 0 8px; gap: 5px; }
  .accounts { gap: 4px; }
  .account-chip { padding: 0 9px; }
  .header-right { gap: 10px; }
  .header-status { gap: 10px; padding-left: 10px; }
  .header-tools { padding-left: 10px; }
}
.pin-lock { position: fixed; inset: 0; z-index: 20000; background: var(--bg-app); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pin-box { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.pin-box h2 { font-size: 17px; font-weight: 650; }
.pin-box p { color: var(--text-muted); font-size: 13px; min-height: 19px; }
.pin-box p.error { color: var(--red); }
.pin-box input { height: 46px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-input); text-align: center; font-size: 22px; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; }
.pin-box button { height: 40px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer; }

.app-header .brand span{font-size:22px;font-weight:750;color:var(--accent);margin-left:0}@media(max-width:700px){.app-header .brand span{font-size:18px}}
