/* Chat dropdown and control polish. */
/* Compact portal menu for the chat model selector. */
body.chat-mode .chat-model-select-menu { gap: 1px !important; padding: 3px !important; border-color: #3d3b40 !important; border-radius: 9px !important; background: #202125f7 !important; box-shadow: 0 10px 28px #0008, inset 0 1px #ffffff08 !important; }
body.chat-mode .chat-model-select-menu .select-option { min-height: 26px !important; padding: 4px 7px !important; border-radius: 6px !important; font-size: 10px !important; }
body.chat-mode .chat-model-select-menu .select-option:hover:not(:disabled), body.chat-mode .chat-model-select-menu .select-option:focus-visible { border-color: transparent !important; background: #ffffff0b !important; color: #f1eeee !important; }
body.chat-mode .chat-model-select-menu .select-option[aria-selected="true"] { background: #ffffff08 !important; color: #d5b5ae !important; }
:root {
  --ink: #172034;
  --muted: #697386;
  --line: #e8e0d4;
  --violet: #7a5af8;
  --yellow: #ffcc55;
  --green: #2bb673;
  --pink: #f16f95;
  --blue: #4e93f7;
  --orange: #f58a4b;
  --shadow: 0 18px 50px #33281b14;
  --room-dock-width: min(calc(100vw - 36px), 900px);
}

* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #fff7e9 0, #f7f2e8 44%, #eff3f5 100%); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(18px, 5vw, 74px); position: sticky; top: 0; z-index: 10; background: #fffdf9cc; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }.brand b { color: var(--violet); }.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; box-shadow: inset 0 -4px #0003; }.topbar nav { display: flex; gap: 22px; }.topbar a { color: var(--muted); font-size: 14px; text-decoration: none; }.connection { color: var(--green); font-size: 13px; font-weight: 700; }
main { max-width: 1320px; margin: 0 auto; padding: 42px clamp(18px, 4vw, 54px) 80px; }.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 35px; }.eyebrow { margin: 0 0 8px; color: #8b7e70; font-size: 11px; font-weight: 800; letter-spacing: .14em; }.hero h1 { margin: 0; font-size: clamp(35px, 5vw, 64px); letter-spacing: -.055em; line-height: .98; }.hero h1 em { color: var(--violet); font-style: normal; }.hero-copy { max-width: 590px; margin: 18px 0 0; color: var(--muted); line-height: 1.6; }
.stats { display: flex; min-width: 260px; overflow: hidden; border-radius: 15px; background: #e5dccd; gap: 1px; }.stat { flex: 1; padding: 16px 19px; background: #fffdfa; text-align: center; }.stat strong { display: block; font-size: 25px; }.stat span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fffdfa; box-shadow: var(--shadow); }.panel-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }.panel-title h2, .create-panel h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }.map-layout { display: block; }.live-dot, .soon { padding: 7px 10px; border-radius: 999px; color: #22874e; background: #effcf4; font-size: 10px; font-weight: 800; letter-spacing: .1em; }.soon { color: #6a4dea; background: #f2edff; }
.office { position: relative; min-height: min(72vw, 730px); aspect-ratio: 16 / 9; overflow: hidden; border: 4px solid #342a32; border-radius: 16px; background: #172a2a; image-rendering: pixelated; box-shadow: inset 0 0 0 3px #ffe0a1; }.map-toolbar { position: absolute; z-index: 9; top: 2%; left: 2%; display: flex; gap: 5px; }.map-toolbar button { margin: 0; padding: 7px 9px; border: 3px solid #342a32; border-radius: 3px; background: #24314c; color: #fff7d6; box-shadow: 3px 3px 0 #342a32aa; font-size: 11px; }.map-popup, .map-window { position: absolute; z-index: 8; top: 7%; right: 3%; width: min(390px, 42%); max-height: 84%; overflow: auto; padding: 18px; border: 5px solid #342a32; border-radius: 6px; background: #fff4cf; box-shadow: 7px 7px 0 #342a3299, inset 0 0 0 3px #fffdf0; }.map-window { left: 5%; right: auto; width: min(820px, 70%); max-height: 86%; }.map-popup.hidden, .map-window.hidden { display: none; }.map-popup h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }.popup-close { float: right; width: 28px; height: 28px; margin: -5px -5px 4px 9px; padding: 0; border: 3px solid #342a32; border-radius: 3px; background: #df6666; color: #fff; font-size: 21px; line-height: 18px; }.map-window #tickets-window, .map-window #models-window, .map-window #social-window, .map-window #activity-window { display: block; margin: 0; }.map-window #tickets-window { display: grid; grid-template-columns: 1.3fr .7fr; }.map-window .panel { box-shadow: none; background: transparent; border: 0; padding: 8px; }.map-window .models-panel, .map-window .social-panel { margin-top: 0; }
.agent { position: absolute; z-index: 2; display: grid; place-items: center; gap: 5px; border: 0; background: none; cursor: pointer; transform: translate(-50%, -50%); transition: left .9s cubic-bezier(.2,.85,.25,1), top .9s cubic-bezier(.2,.85,.25,1); }.agent-sprite { width: 58px; height: 58px; background-image: url('/assets/office-agents-pixelart.png'); background-repeat: no-repeat; background-size: 500% 200%; background-position: var(--sprite-x) var(--sprite-y); image-rendering: pixelated; filter: drop-shadow(0 4px 0 #0003); animation: walk 4s ease-in-out infinite; }.agent.active .agent-label { color: #fff; background: var(--ink); }.agent.travelling .agent-sprite { animation: dash .18s steps(2) 5; }.agent-label { padding: 3px 7px; border-radius: 7px; background: #fffdf9e8; box-shadow: 0 2px 5px #4e3d1a22; font-size: 10px; font-weight: 800; white-space: nowrap; }.agent.selected .agent-sprite { outline: 4px solid #fff4a2; border-radius: 12px; transform: translateY(-5px); } @keyframes walk { 0%, 100% { margin-top: 0; } 50% { margin-top: -7px; } } @keyframes dash { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-4deg); } }
.map-caption, .muted { color: var(--muted); font-size: 13px; line-height: 1.5; }.agent-panel { display: flex; flex-direction: column; min-height: 420px; }.agent-avatar { width: 65px; height: 65px; margin: 8px 0 16px; border-radius: 20px; background: var(--agent); }.agent-role { margin: 4px 0 21px; color: var(--muted); }
label { display: grid; gap: 6px; margin-top: 11px; color: #625c54; font-size: 12px; font-weight: 800; } input, textarea, select { min-width: 0; padding: 10px; border: 1px solid #ded6ca; border-radius: 10px; background: #fff; font: inherit; } button { margin-top: 15px; padding: 11px 13px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; font: inherit; font-weight: 800; } .ghost { margin: 0; padding: 8px 11px; background: #f2ece4; color: var(--ink); font-size: 12px; }
.work-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; margin-top: 20px; }.ticket-list, .social-queue, .event-feed { display: grid; gap: 9px; }.ticket-list, .social-queue { max-height: 410px; overflow: auto; }.ticket, .social-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px; border: 1px solid #eee5d8; border-radius: 12px; }.ticket h3, .social-item h4 { margin: 0 0 3px; font-size: 14px; }.ticket p, .social-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }.tag { height: max-content; padding: 5px 7px; border-radius: 999px; color: #6955c5; background: #f0edf9; font-size: 10px; font-weight: 800; letter-spacing: .07em; }.tag.PENDING_REVIEW, .tag.DRAFT { color: #9b7013; background: #fff3cf; }.tag.APPROVED, .tag.READY_TO_RENDER { color: #298a51; background: #e7f7eb; }.tag.IN_PROGRESS, .tag.IN_REVIEW { color: #3677c9; background: #e8f1ff; }.tag.BLOCKED, .tag.FAILED { color: #be4b4b; background: #ffe7e7; }.ticket-actions, .social-actions { display: flex; grid-column: 1 / -1; gap: 6px; }.ticket-actions button, .social-actions button { margin: 0; padding: 6px 9px; font-size: 11px; }.approve { background: var(--green); }.reject { background: #d15353; }.start, .remotion { background: var(--violet); }.review { background: #557ed1; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.project-register { margin-top: 17px; color: var(--muted); font-size: 12px; }.project-register form { display: grid; gap: 4px; margin-top: 9px; }.project-register button { background: #f2ece4; color: var(--ink); } #tickets-window, #models-window, #social-window, #activity-window, #github-window { display: none; }
.models-panel, .social-panel, .feed-panel { margin-top: 20px; }.provider-strip, .model-catalog { display: flex; flex-wrap: wrap; gap: 9px; }.provider-strip { margin-bottom: 14px; }.provider { margin: 0; padding: 8px 12px; color: #6d655c; background: #f5efe7; font-size: 12px; }.provider.active { color: #fff; background: var(--violet); }.model-chip { min-width: 180px; padding: 10px 12px; border: 1px solid #e7dfe7; border-radius: 12px; background: #fff; font-size: 12px; }.model-chip b { display: block; margin-bottom: 3px; }.model-chip small { color: var(--muted); }
.social-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.social-cards > div { padding: 17px; border: 1px solid #eee2d4; border-radius: 15px; background: linear-gradient(135deg, #fff5ea, #f6efff); }.social-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 900; }.social-cards h3 { margin: 12px 0 5px; font-size: 15px; }.social-cards p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }.social-cards small { color: #6e5e8f; font-size: 10px; font-weight: 700; }.social-workbench { display: grid; grid-template-columns: minmax(260px, .7fr) 1.3fr; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }.social-workbench h3 { margin: 0 0 10px; font-size: 15px; }.social-form { display: grid; gap: 3px; }
.event { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #f0e9e1; font-size: 12px; }.event time { color: var(--muted); }.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; padding: 12px 16px; border-radius: 12px; background: #172034; color: #fff; box-shadow: var(--shadow); font-size: 13px; transform: translateY(100px); transition: .25s; }.toast.show { transform: translateY(0); }
@media (max-width: 850px) { .topbar nav { display: none; } .hero, .section-grid, .work-grid, .social-workbench { display: grid; grid-template-columns: 1fr; } .stats { min-width: 0; } .office { min-height: 360px; } .social-cards { grid-template-columns: 1fr 1fr; } }
.map-window #approvals-window { display: block; margin: 0; }.map-window .approvals-panel { margin-top: 0; }#approvals-window { display: none; }.approval-workbench { display: grid; grid-template-columns: minmax(260px, .7fr) 1.3fr; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }.approval-workbench h3 { margin: 0 0 10px; font-size: 15px; }.approval-form, .approval-list { display: grid; gap: 9px; }.approval-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px; border: 1px solid #eee5d8; border-radius: 12px; }.approval-item h3 { margin: 0 0 3px; font-size: 14px; }.approval-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }.approval-actions { display: flex; grid-column: 1 / -1; gap: 6px; }.approval-actions button { margin: 0; padding: 6px 9px; font-size: 11px; }
.map-window #credentials-window { display: block; margin: 0; }.credentials-panel { display: none; }
.map-window #github-window { display: block; margin: 0; }.github-connection-panel { margin-top: 20px; }
.github-status-badge.status-ok, .soon.status-ok { color: #22874e; background: #effcf4; }
.github-status-banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid #eee5d8; border-radius: 14px; background: #fffdfa; }
.github-status-banner-error { border-color: #5c3434; background: #2e2324; }
.github-status-banner-ok { border-color: #2c4a3a; background: #1f2b26; }
.github-status-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 999px; background: #d15353; }
.github-status-banner-ok .github-status-dot { background: var(--green); }
.github-status-banner strong { display: block; margin-bottom: 4px; font-size: 13px; color: #f1f1f3; }
.github-status-banner p { margin: 0; color: #b6aaa7; font-size: 12px; line-height: 1.5; }
.github-status-banner button { margin: 10px 0 0; padding: 8px 12px; font-size: 12px; }
.github-login-steps { margin: 8px 0 0; padding-left: 18px; color: #b6aaa7; font-size: 12px; line-height: 1.6; }
.github-login-steps code { padding: 1px 5px; border-radius: 5px; background: #ffffff14; color: #ececf1; font-size: 11px; }
.github-connect-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.github-connect-actions button { margin: 0; padding: 9px 14px; font-size: 13px; }
.github-login-area:empty { display: none; }
.github-login-area { margin-top: 12px; }
.github-device-code { display: grid; gap: 6px; justify-items: start; padding: 14px; border: 1px solid #3d4a44; border-radius: 12px; background: #1a2421; }
.github-device-code span { color: #9fb5ab; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.github-device-code strong { color: #f4f7f5; font-size: 28px; letter-spacing: .12em; font-family: ui-monospace, Consolas, monospace; }
.github-device-code p { margin: 0; color: #b6aaa7; font-size: 12px; line-height: 1.5; }
.github-device-link { display: inline-block; margin: 4px 0 0; padding: 8px 12px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-family: inherit; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.model-library-entry { margin: 0 0 12px; }
.model-library-loading { position: relative; overflow: hidden; display: grid; place-items: center; gap: 8px; min-height: 64px; margin-bottom: 4px; border: 1px solid #34353a; border-radius: 12px; background: #1d1e22; }
.model-library-loading .model-library-status { margin: 0; color: #b9a9ff; font-size: 12px; letter-spacing: .08em; animation: model-library-status-in 360ms ease both; }
.model-library-scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, #b9a6ff1f 60%, #d9ccff47 100%); transform: translateY(-100%); animation: model-library-scan 1.6s cubic-bezier(.45, 0, .2, 1) infinite; pointer-events: none; }
@keyframes model-library-scan { to { transform: translateY(100%); } }
@keyframes model-library-status-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.model-library-skeleton-row { display: grid; gap: 8px; padding: 12px; border: 1px solid #34353a; border-radius: 12px; background: #26272b; animation: chat-skeleton-in 420ms cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i, 0) * 110ms); }
.model-library-skeleton-line { display: block; height: 12px; width: 35%; border-radius: 6px; }
.model-library-skeleton-line.wide { width: 70%; height: 14px; }
.model-library-dialog { width: min(720px, calc(100vw - 32px)); max-height: 80vh; padding: 18px; border: 1px solid #414247; border-radius: 16px; background: #202125; color: #ececf1; box-shadow: 0 20px 60px #000a; }
.model-library-dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
.model-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.model-library-head h3 { margin: 0; font-size: 18px; font-weight: 400; color: #f1f1f3; }
.model-library-head .eyebrow { margin: 0 0 4px; }
.model-library-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; scrollbar-width: none; margin-top: 12px; }
.model-library-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #34353a; border-radius: 12px; background: #26272b; }
.model-library-item strong { font-size: 13px; font-weight: 400; color: #ececf1; word-break: break-all; }
.model-library-item p { margin: 3px 0 0; font-size: 11px; }
.model-library-action { display: grid; gap: 6px; justify-items: end; min-width: 170px; }
.model-library-action button { margin: 0; padding: 8px 12px; font-size: 12px; }
.model-library-targets { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.model-library-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.model-library-filters label { margin-top: 0; font-size: 11px; color: #a6a7ae; }
.model-library-progress { width: 170px; font-size: 11px; color: #b5b6bd; }
.model-library-progress[hidden] { display: none; }
.model-library-progress i { display: block; height: 3px; margin-top: 4px; width: 0; border-radius: 2px; background: linear-gradient(90deg, #8d78e6, #ef7c6b); transition: width .4s ease; }
@media (max-width: 600px) { .model-library-item { flex-direction: column; align-items: stretch; } .model-library-action { justify-items: stretch; min-width: 0; } .model-library-progress { width: 100%; } }
.model-provider-connection { margin: 0 0 14px; }
.model-provider-connection[hidden] { display: none; }
.model-provider-card { display: grid; gap: 10px; padding: 14px; border: 1px solid #eee5d8; border-radius: 12px; background: #fffdfa; }
.model-provider-card.is-connected { display: flex; align-items: center; gap: 12px; }
.model-provider-card.is-connected > div { flex: 1; min-width: 0; }
.model-provider-card p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; }
.model-provider-card label { margin-top: 0; }
.model-provider-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.model-provider-actions button { margin: 0; padding: 9px 13px; font-size: 13px; }
.chat-mode .command-panel-slot .model-provider-card { border-color: #51403e; background: linear-gradient(145deg, #302829, #272629 72%, #232427); color: #e8e2e0; }
.chat-mode .command-panel-slot .model-provider-card input { border-color: #514442; background: #242427; color: #eee8e6; }
.github-status-banner-compact { padding: 10px 12px; border-radius: 10px; }
.command-tab-menu { display: none; }
@media (max-width: 850px) {
  body.chat-mode #map-window { top: 0; right: 0; bottom: 0; left: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; transform: none; border-radius: 0; box-shadow: none; animation: chat-sheet-in 360ms cubic-bezier(.16, 1, .3, 1) both; }
  body.chat-mode #operator-chat-window { padding: 14px 12px 12px; border: 0; border-radius: 0; }
  body.chat-mode .command-tabs { display: none; }
  body.chat-mode .command-tab-menu { display: block; flex: 1 1 auto; min-width: 0; margin: 4px 0 6px; }
  body.chat-mode .command-tab-menu .select-shell { width: 100%; }
  body.chat-mode .chat-header .chat-status { display: none; }
  body.chat-mode #map-window-close { top: 8px; right: 8px; }
  body.chat-mode .chat-compose-row { flex-wrap: wrap; }
  body.chat-mode .chat-compose-row .chat-compose-input-shell { order: -1; flex: 1 1 100%; min-width: 0; }
  body.chat-mode .chat-compose-row .chat-attach-button { order: 1; }
  body.chat-mode .chat-compose-row #chat-generate-idea { order: 2; }
  body.chat-mode .chat-compose-row #chat-record-audio { order: 3; margin-left: auto; }
  body.chat-mode .chat-compose-row > button[type="submit"] { order: 4; }
}
@keyframes chat-sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.room-icon { display: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 850px) {
  #room-navigation { gap: 6px; padding: 5px 8px; }
  #room-navigation .room-navigation-side { gap: 6px; }
  #room-navigation .room-navigation-side button { display: grid; place-items: center; width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 13px; }
  #room-navigation .room-navigation-side button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #room-navigation .room-icon { display: block; }
  #room-navigation .v08-chat-button { width: 46px; height: 46px; }
}
.github-status-banner-compact strong { font-size: 12px; }
.github-status-banner-compact button { margin-top: 8px; }@media (max-width: 850px) { .approval-workbench { grid-template-columns: 1fr; } }
@media (max-width: 520px) { main { padding: 28px 14px 60px; } .panel { padding: 16px; } .social-cards { grid-template-columns: 1fr; } .office { min-height: 310px; } .agent-label { font-size: 8px; } .agent-sprite { transform: scale(.8); } .topbar { padding: 0 14px; } }
.hidden { display: none !important; }.session-actions { display: flex; align-items: center; gap: 10px; }.logout { margin: 0; padding: 7px 10px; border-radius: 8px; background: #f2ece4; color: var(--ink); font-size: 12px; }.approval-waiting { grid-column: 1 / -1; margin: 0; color: #786b5b; font-size: 12px; font-weight: 700; }
.office { background: #10182a; }.office canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }.office canvas:active { cursor: grabbing; }
.agent-label small { display: block; margin-top: 2px; color: #6a5f53; font-size: 8px; font-weight: 700; }.agent.active .agent-label small { color: #dce7ff; }.agent-capability { margin: -10px 0 12px; color: #51493f; font-size: 13px; line-height: 1.45; }.agent-status { display: inline-block; margin: 0 0 7px; padding: 5px 8px; border-radius: 999px; background: #edf8ef; color: #287d49; font-size: 11px; font-weight: 800; }.report-result { margin-top: 11px; padding: 10px; border: 1px solid #ded2bf; border-radius: 10px; background: #fff8e8; font-size: 12px; line-height: 1.45; }.report-result p { margin: 0 0 6px; }.report-result p:last-child { margin-bottom: 0; }
.handoff-prompt { max-height: 180px; overflow: auto; margin: 8px 0; padding: 9px; border: 1px solid #ded2bf; border-radius: 6px; background: #1f2a3d; color: #fff7d6; font: 10px/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
@media (min-width: 851px) { main { position: relative; max-width: none; min-height: calc(100vh - 70px); padding: 0; }.hero { position: absolute; z-index: 7; top: 20px; left: clamp(24px, 4vw, 70px); width: min(590px, 46vw); margin: 0; padding: 16px 19px; border: 1px solid #ffffff66; border-radius: 17px; background: #fffdf9d9; box-shadow: 0 14px 35px #1720342e; backdrop-filter: blur(10px); }.hero h1 { font-size: clamp(28px, 3.2vw, 48px); }.hero-copy { margin-top: 11px; }.stats { position: absolute; right: 0; bottom: 0; min-width: 230px; border-radius: 12px 0 0 0; }.map-layout { min-height: calc(100vh - 70px); }.map-layout .map-panel { height: calc(100vh - 70px); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }.map-layout .panel-title { display: none; }.office { min-height: calc(100vh - 70px); height: calc(100vh - 70px); aspect-ratio: auto; border-width: 0; border-radius: 0; }.map-popup, .map-window { top: 10%; max-height: 82%; }.map-window { left: 4%; width: min(900px, 76%); } }
@property --auth-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; padding: 22px; background: radial-gradient(ellipse at 18% 12%, #2b1f4d 0, transparent 55%), radial-gradient(ellipse at 88% 88%, #3b1721 0, transparent 52%), #07080d; transition: opacity .62s ease, filter .62s ease; }
.auth-gate.opening { opacity: 0; filter: blur(8px); pointer-events: none; }
.auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-card { position: relative; width: min(420px, 100%); overflow: hidden; padding: 40px 36px 30px; border: 1px solid transparent; border-radius: 26px; background: linear-gradient(170deg, #14151dfa, #0b0c11f5) padding-box, conic-gradient(from var(--auth-angle), #2b2540, #f0705c, #a994ff, #2b2540) border-box; box-shadow: 0 40px 120px #000c; color: #ececf1; animation: auth-card-in .8s cubic-bezier(.16, 1, .3, 1) both, auth-angle-spin 9s linear infinite; }
.auth-scan { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: linear-gradient(180deg, transparent 0%, transparent 80%, #a994ff1f 96%, #e6dbff66 100%); transform: translateY(-100%); animation: auth-scan 1.4s cubic-bezier(.45, 0, .2, 1) .2s both; pointer-events: none; }
.auth-core { position: relative; display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 16px; }
.auth-logo { position: relative; z-index: 2; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 0 0 1px #ffffff14, 0 0 28px 4px #d0453a55; animation: auth-core 3.6s ease-in-out infinite; transition: transform .3s ease, box-shadow .3s ease; }
.auth-core b { position: absolute; inset: -6px; z-index: 1; border: 1px solid #f28d7a4d; border-radius: 50%; animation: chat-ring 2.8s cubic-bezier(.2, .6, .3, 1) infinite; }
.auth-smoke { position: absolute; inset: -40px; z-index: 0; border-radius: 50%; background: radial-gradient(circle at 40% 45%, #e0503fb3 0, #8a2d5a66 36%, transparent 66%); filter: blur(14px); mix-blend-mode: screen; animation: auth-smoke-drift 6s ease-in-out infinite; }
.auth-smoke-2 { inset: -46px; background: radial-gradient(circle at 60% 40%, #a48bffa6 0, #3a2a6a66 42%, transparent 70%); animation-duration: 8s; animation-delay: -2s; }
.auth-smoke-3 { inset: -54px; background: radial-gradient(circle at 50% 62%, #ff9a7a80 0, transparent 60%); animation-duration: 10s; animation-delay: -4s; }
.auth-core { margin-bottom: 22px; }
@keyframes auth-smoke-drift { 0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: .7; } 50% { transform: translate(6px, -10px) scale(1.12) rotate(25deg); opacity: 1; } }
.auth-card:focus-within .auth-logo { transform: scale(1.06); box-shadow: 0 0 0 1px #ffffff1a, 0 0 40px 8px #e0503f77; }
.auth-card .eyebrow { margin: 0 0 10px; color: #8f8aa0; text-align: center; font-size: 10px; letter-spacing: .24em; }
.auth-card h1 { margin: 0 0 8px; text-align: center; font-size: 30px; font-weight: 400; letter-spacing: -.035em; background: linear-gradient(100deg, #ffffff, #c9bfff 55%, #ffb8a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy { margin: 0; text-align: center; color: #9d98ae; font-size: 13px; line-height: 1.55; }
.login-form { display: grid; gap: 4px; margin-top: 24px; }
.auth-field { display: grid; gap: 7px; margin-top: 12px; color: #8f8aa0; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.auth-field[hidden] { display: none; }
.auth-field input { padding: 13px 14px; border: 1px solid #2a2836; border-radius: 12px; background: #0f1016; color: #f2f0f7; font-size: 15px; letter-spacing: 0; text-transform: none; transition: border-color .2s ease, box-shadow .2s ease; }
.auth-field input:focus { outline: none; border-color: #a994ff; box-shadow: 0 0 0 4px #a994ff26, 0 0 24px #a994ff33; }
.login-form button { margin-top: 20px; width: 100%; padding: 14px; border: 0; border-radius: 13px; background: linear-gradient(120deg, #f0705c, #a994ff, #f0705c); background-size: 200% 100%; color: #fff; font-size: 14px; letter-spacing: .04em; transition: background-position .6s ease, transform .2s ease, opacity .2s ease; }
.login-form button:hover:not(:disabled) { background-position: 100% 0; transform: translateY(-1px); }
.login-form button:disabled { opacity: .6; }
.auth-hint { margin: 20px 0 0; text-align: center; color: #6f6b80; font-size: 11px; letter-spacing: .04em; }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes auth-angle-spin { to { --auth-angle: 360deg; } }
@keyframes auth-scan { to { transform: translateY(100%); } }
@keyframes auth-core { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }
@media (max-width: 480px) { .auth-card { padding: 32px 24px 26px; } .auth-card h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .auth-card, .auth-scan, .auth-logo, .auth-smoke, .auth-core b { animation: none; } }
.map-window #ideas-window { display: block; margin: 0; }.ideas-workbench, .project-flow-workbench { display: grid; grid-template-columns: minmax(250px, .7fr) 1.3fr; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }.ideas-workbench h3, .project-flow-workbench h3 { margin: 0 0 10px; font-size: 15px; }.idea-form, .flow-form { display: grid; gap: 5px; }.project-flow-workbench { grid-template-columns: 1fr; }.flow-form { grid-template-columns: repeat(4, minmax(130px, 1fr)); align-items: end; }.idea-list, .flow-list { display: grid; gap: 9px; }.idea-item, .flow-item { padding: 12px; border: 1px solid #eee5d8; border-radius: 12px; background: #fffdfa; }.idea-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.idea-item h4, .flow-item p { margin: 0 0 3px; }.idea-item p, .flow-item p { color: var(--muted); font-size: 12px; line-height: 1.4; }.idea-actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 5px; }.idea-actions button { margin: 0; padding: 5px 7px; font-size: 10px; }.flow-item { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }.flow-item p { width: 100%; margin-bottom: 0; }@media (max-width: 850px) { .ideas-workbench { grid-template-columns: 1fr; }.flow-form { grid-template-columns: 1fr; } }
/* Oficina Phaser: el mapa es el escenario principal y la interfaz flota sobre él. */
body { background: #10182a; }
.hero { pointer-events: none; opacity: .92; }
.hero h1 { font-size: clamp(22px, 2.4vw, 36px); }
.hero-copy { max-width: 390px; font-size: 12px; }
.stats { backdrop-filter: blur(10px); }
.office { min-height: calc(100vh - 70px); height: calc(100vh - 70px); border: 0; border-radius: 0; background: #415f63; box-shadow: inset 0 0 100px #203a3f; }
.office canvas { image-rendering: pixelated; }
.map-toolbar { top: 14px; right: 14px; bottom: auto; left: auto; max-width: min(520px, calc(100vw - 32px)); flex-wrap: wrap; justify-content: flex-end; padding: 7px; border: 1px solid #7080a2; border-radius: 14px; background: #111a2ddd; box-shadow: 0 10px 35px #050914aa; backdrop-filter: blur(12px); transform: none; }
.map-toolbar button { border-color: #536482; background: #202d46; color: #f5e5c6; border-radius: 8px; }
.map-toolbar button:hover, .map-toolbar button:focus-visible { background: #7a5af8; transform: translateY(-1px); }
.map-caption { position: absolute; z-index: 4; left: 50%; bottom: 4px; transform: translateX(-50%); color: #abb9d4; font: 11px monospace; }
@media (min-width: 851px) { .hero { top: 18px; left: 28px; width: min(410px, 31vw); padding: 12px 15px; border-radius: 13px; background: #101a2dcc; border-color: #7585a055; color: #f5e5c6; }.hero h1, .hero-copy, .hero .eyebrow { color: #f5e5c6; }.stats { right: 18px; bottom: 18px; border-radius: 14px; overflow: hidden; }.map-popup, .map-window { top: 14%; max-height: 76%; } }
@media (max-width: 850px) { .hero { margin: 0; padding: 12px 16px; background: #101a2ddd; color: #f5e5c6; }.hero h1, .hero-copy, .hero .eyebrow { color: #f5e5c6; }.office { min-height: calc(100vh - 70px); height: calc(100vh - 70px); }.map-toolbar { top: auto; right: 10px; bottom: 10px; left: 10px; max-width: none; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }.map-caption { display: none; } }

/* La oficina es la interfaz principal: el mapa ocupa todo el viewport y el HUD no tapa las salas. */
.topbar { display: none; }
main { min-height: 100vh; height: 100vh; padding: 0; }
.map-layout, .map-layout .map-panel, .office { min-height: 100vh; height: 100vh; }
.map-layout .map-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.map-layout .panel-title, .map-caption { display: none; }
.hero { display: block; position: fixed; z-index: 7; top: 14px; left: 14px; width: auto; margin: 0; padding: 0; pointer-events: none; opacity: 1; }
.hero > div:first-child { display: none; }
.stats { min-width: 0; width: auto; border: 1px solid #91a0bd88; border-radius: 11px; background: #101a2dcc; box-shadow: 0 9px 24px #05091499; backdrop-filter: blur(10px); }
.stat { min-width: 76px; padding: 8px 11px; background: transparent; color: #f5e5c6; }
.stat strong { font-size: 18px; }
.stat span { color: #b8c5dc; font-size: 9px; }
.office { width: 100vw; border: 0; border-radius: 0; }
.map-popup, .map-window { top: 9%; max-height: 78%; }
#agents-window { display: none; }
.map-toolbar #map-logout { background: #694657; }
.map-window .panel-title { display: flex; }
.map-window #agents-window { display: block; margin: 0; }
.agent-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.agent-directory-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; width: 100%; margin: 0; padding: 8px; border: 1px solid #e0d4bf; border-radius: 9px; background: #fff9e8; color: #172034; text-align: left; }
.agent-directory-item:hover, .agent-directory-item:focus-visible { background: #eee6ff; outline: 2px solid #8d72ef; }
.agent-directory-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--agent); color: #fff; font-weight: 900; }
.agent-directory-item b, .agent-directory-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-directory-item small { margin-top: 2px; color: #756b5e; font-size: 10px; }
.agent-directory-arrow { color: #7a5af8; font-size: 21px; }
@media (max-width: 850px) {
  .hero { top: 10px; left: 10px; }
  .stat { min-width: 64px; padding: 7px 8px; }
  .map-popup, .map-window { top: 8%; max-height: 78%; }
  .agent-directory { grid-template-columns: 1fr; }
}

/* Navegación por salas: una escena detallada cada vez, como en el piloto visual. */
.room-navigation {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: clamp(20px, 3vh, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: var(--room-dock-width);
  margin: 0;
  transform: translateX(-50%);
  padding: 6px;
  border: 1px solid #dce4f02b;
  border-radius: 17px;
  background: linear-gradient(145deg, #20252bd9, #11181edb);
  box-shadow: 0 16px 42px #05090db3, 0 2px 8px #05090d66, inset 0 1px #ffffff18;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
.room-navigation-side { display: flex; align-items: center; gap: 4px; min-width: 0; }
.room-navigation-before { grid-column: 1; justify-content: flex-end; }
.room-navigation-after { grid-column: 3; justify-content: flex-start; }
.room-navigation-side button {
  position: relative;
  flex: 0 0 auto;
  min-width: 60px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c4c8d0;
  font: 500 10px/1.1 ui-monospace, Consolas, monospace;
  letter-spacing: .02em;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.room-navigation-side button:hover { border-color: #ffffff1c; background: #ffffff0c; color: #f0f1f5; }
.room-navigation-side button:focus-visible { border-color: #c8b6ff99; background: #ffffff0c; color: #f0f1f5; outline: 2px solid #aa91ff; outline-offset: 1px; }
.room-navigation-side button.active { border-color: #d8c0ea80; background: linear-gradient(145deg, #d7b8e8, #bea2d3); color: #25202b; box-shadow: 0 3px 14px #b58bd533, inset 0 1px #ffffff82; }
.room-navigation .v08-chat-button { position: relative; grid-column: 2; grid-row: 1; justify-self: center; display: grid; place-items: center; width: 46px; height: 46px; min-width: 46px; margin: 0; padding: 4px; border: 1px solid #a994ff8c; border-radius: 15px; background: #24232ddb; color: #faf9ff; cursor: pointer; box-shadow: 0 5px 16px #6348ca33, inset 0 1px #ffffff20; transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.room-navigation .v08-chat-button img { display: block; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.room-navigation .v08-chat-button:hover { transform: translateY(-1px); border-color: #c4b6ff; background: #302c3ee8; box-shadow: 0 7px 20px #6348ca55, inset 0 1px #ffffff35; }
.room-navigation .v08-chat-button.active { border-color: #c5b9ff; background: #40365ee8; box-shadow: 0 0 0 2px #ad9aff35, 0 4px 14px #49389466, inset 0 1px #ffffff2b; }
.office { background: radial-gradient(circle at 50% 42%, #173436 0, #0c2023 62%, #081619 100%); }
#office-canvas { visibility: hidden; pointer-events: none; }
#live-office-map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-toolbar { top: 12px; right: 12px; }
.chat-mode #live-office-map { pointer-events: none; }
@media (max-width: 850px) {
  :root { --room-dock-width: calc(100vw - 16px); }
  .room-navigation { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); width: var(--room-dock-width); gap: 5px; }
  .room-navigation-side { gap: 3px; }
  .room-navigation-side button { min-width: 56px; padding: 7px 6px; }
  .room-navigation .v08-chat-button { width: 42px; height: 42px; min-width: 42px; padding: 3px; }
  .map-toolbar { top: 8px; right: 8px; bottom: auto; left: auto; max-width: calc(100vw - 16px); }
}
.operator-chat-panel { display: none; }
.map-window .operator-chat-panel { display: block; margin: 0; }
.map-window.maximized { top: 3%; right: 3%; bottom: 3%; left: 3%; width: auto; max-height: none; }
.map-window-maximize { margin-right: 4px; background: #5d79c8; }
@media (max-width: 850px) { .map-window.maximized { top: 2%; right: 2%; bottom: 2%; left: 2%; width: auto; } }
@media (max-width: 600px) {
  .room-navigation { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 3px; padding: 5px; }
  .room-navigation-side { flex-wrap: wrap; align-content: center; max-height: 62px; overflow: auto; }
  .room-navigation-side button { min-width: 0; padding: 5px 4px; font-size: 8px; }
  .room-navigation .v08-chat-button { width: 40px; height: 40px; min-width: 40px; padding: 3px; }
  .room-navigation .v08-chat-button img { width: 30px; height: 30px; }
}
.operator-chat-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; margin-bottom: 12px; }
.operator-chat-list p { margin: 0; padding: 8px 10px; border-radius: 8px; background: #f5efe7; font-size: 12px; }
html, body { overflow-x: hidden; }
.command-tabs button:focus-visible, .v08-chat-button:focus-visible, .map-window-maximize:focus-visible { outline: 3px solid #f1c86b; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* Chat principal: conversación centrada, composición fija y contexto bajo demanda. */
.chat-mode { overflow: hidden; }
.chat-mode #map-window::backdrop { background: rgb(0 0 0 / 10%); }
.chat-mode #map-window { position: fixed; z-index: 40; top: max(12px, 2vh); left: 50%; right: auto; bottom: calc(82px + 2vh); width: var(--room-dock-width); height: auto; max-height: none; overflow: hidden; margin: 0; padding: 0; transform: translateX(-50%); transform-origin: 50% 100%; border: 0; border-radius: 18px; background: transparent; box-shadow: 0 20px 70px #0009; isolation: isolate; animation: chat-emerge 560ms cubic-bezier(.16, 1, .3, 1) both; }
.chat-mode #operator-chat-window { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 28px 28px 20px; overflow-x: hidden; border: 1px solid #ffffff20; border-radius: 18px; background: rgba(24, 25, 27, .94); color: #ececf1; box-shadow: inset 0 1px #ffffff12; backdrop-filter: blur(12px); }
.chat-mode #map-window-close { position: absolute; z-index: 2; top: 10px; right: 12px; display: grid; width: 38px; height: 38px; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #aaa9b0; font-size: 25px; line-height: 1; transition: color 160ms ease, background 160ms ease, transform 200ms ease; }
.chat-mode #map-window-close:hover, .chat-mode #map-window-close:focus-visible { border: 0; outline: 0; background: #ffffff0c; color: #f2d6d2; transform: rotate(90deg); }
.chat-mode #map-window.chat-closing { animation: chat-dismiss 220ms cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
@keyframes chat-dismiss { to { opacity: 0; transform: translate(-50%, 14px) scale(.975); filter: blur(3px); } }
.chat-mode .chat-header { padding: 0 56px 18px 0; border-bottom: 1px solid #303136; }
.chat-mode .chat-header .eyebrow { color: #9b9ca4; }
.chat-mode .chat-header h2 { margin: 0; color: #f3f3f5; font-size: 21px; letter-spacing: -.02em; }
.chat-mode .operator-chat-list { flex: 1; width: min(100%, 800px); min-width: 0; max-height: none; margin: 0 auto; padding: 28px 8px 24px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; align-content: start; }
.chat-mode .operator-chat-list::-webkit-scrollbar { display: none; }
.chat-mode .operator-chat-list:hover { box-shadow: inset 0 10px 14px -16px #fff8, inset 0 -10px 14px -16px #fff8; }
.chat-mode .chat-message { box-sizing: border-box; width: fit-content; min-width: 0; max-width: 100%; padding: 13px 16px; border-radius: 18px; background: #242529; color: #eeeeef; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.chat-mode .chat-message-content { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.chat-mode .chat-message b { display: block; margin-bottom: 4px; color: #aaaab2; font-size: 11px; font-weight: 600; }
.chat-mode .chat-message p { margin: 0; padding: 0; background: transparent; color: inherit; font-size: 15px; white-space: pre-wrap; }
.chat-mode .chat-message:not(.assistant) { justify-self: end; background: #34363b; }
.chat-mode .chat-message.assistant { justify-self: start; }
.chat-mode .operator-chat-list.is-empty { place-content: center; }
.chat-mode .chat-empty-state { position: relative; display: grid; justify-items: center; gap: 10px; min-width: min(280px, 80%); margin: auto; padding: 24px 30px; border: 0 !important; border-radius: 0; background: transparent !important; color: #b7b2b4; text-align: center; box-shadow: none !important; }
.chat-mode .chat-empty-aura { position: relative; display: grid; width: 84px; height: 84px; place-items: center; isolation: isolate; }
.chat-mode .chat-empty-aura::before { position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(ellipse, #f36a5638 0, #d74a3b20 32%, #a22f2b0c 56%, transparent 76%); content: ''; filter: blur(10px); animation: chat-empty-glow 3.6s ease-in-out infinite; }
.chat-mode .chat-empty-aura::after { position: absolute; inset: 6px; border: 1px solid transparent; border-radius: 50%; background: conic-gradient(from 10deg, transparent 0deg, #dd594b08 55deg, #f08a714d 105deg, #d84c3c18 150deg, transparent 218deg, #ec75622b 284deg, transparent 360deg); content: ''; filter: blur(1.5px); mask: radial-gradient(transparent 57%, #000 62%, #000 65%, transparent 71%); animation: chat-empty-orbit 9s linear infinite; }
.chat-mode .chat-empty-aura i { z-index: 1; width: 20px; height: 20px; border: 1px solid #ff9b806b; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #ffd2b3 0, #f78a70 13%, #e04d41 34%, #a8292d 62%, #521c27 100%); box-shadow: 0 0 7px 2px #f0705c9c, 0 0 20px 7px #d3423780, 0 0 42px 13px #a82d322e, inset 0 1px 3px #ffe0c5a6; animation: chat-empty-core 3.2s ease-in-out infinite; }
.chat-mode .chat-empty-aura b { position: absolute; top: 14px; left: 40px; z-index: 2; width: 4px; height: 4px; border-radius: 50%; background: radial-gradient(circle, #fff0d5 0, #ffc1a0 34%, #ec6555 72%, transparent 100%); box-shadow: 0 0 8px 2px #f47b68b3; animation: chat-empty-signal 4.8s ease-in-out infinite; }
.chat-mode .chat-empty-label { position: relative; z-index: 1; min-height: 1.4em; color: transparent; font-size: 13px; font-weight: 400; letter-spacing: .03em; background: linear-gradient(100deg, #9d9699 36%, #fff3ee 50%, #9d9699 64%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; animation: chat-label-sheen 3.6s ease-in-out infinite; }
@keyframes chat-label-sheen { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.chat-mode .chat-empty-floor { position: absolute; left: 50%; bottom: -26px; width: 300px; height: 150px; transform: translateX(-50%) perspective(280px) rotateX(64deg); background-image: linear-gradient(#f0705c3d 1px, transparent 1px), linear-gradient(90deg, #f0705c3d 1px, transparent 1px); background-size: 28px 28px; -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 100%); mask: radial-gradient(closest-side, #000 20%, transparent 100%); opacity: .7; animation: chat-floor-drift 4.2s linear infinite; pointer-events: none; }
@keyframes chat-floor-drift { from { background-position: 0 0, 0 0; } to { background-position: 0 28px, 0 0; } }
.chat-mode .chat-empty-ring { position: absolute; inset: 14px; border: 1px solid #f28d7a80; border-radius: 50%; animation: chat-ring 2.8s cubic-bezier(.2, .6, .3, 1) infinite; pointer-events: none; }
.chat-mode .chat-empty-ring:nth-of-type(2) { animation-delay: .93s; }
.chat-mode .chat-empty-ring:nth-of-type(3) { animation-delay: 1.86s; }
@keyframes chat-ring { 0% { opacity: .75; transform: scale(.42); } 100% { opacity: 0; transform: scale(1.9); } }
.chat-mode .chat-empty-spark { position: absolute; z-index: 1; width: 3px; height: 3px; border-radius: 50%; background: #ffd8c8; box-shadow: 0 0 8px 2px #f47b68a6; animation: chat-spark 3.4s ease-in-out infinite; pointer-events: none; }
.chat-mode .chat-empty-spark:nth-child(6) { top: 4px; left: 36px; }
.chat-mode .chat-empty-spark:nth-child(7) { top: 22px; right: 2px; animation-delay: .8s; }
.chat-mode .chat-empty-spark:nth-child(8) { bottom: 6px; left: 52px; animation-delay: 1.6s; }
.chat-mode .chat-empty-spark:nth-child(9) { bottom: 26px; right: 14px; animation-delay: 2.4s; }
@keyframes chat-spark { 0%, 100% { opacity: .15; transform: translateY(0) scale(.7); } 50% { opacity: 1; transform: translateY(-7px) scale(1.25); } }
.chat-mode #operator-chat-window { position: relative; overflow: hidden; }
.chat-mode #operator-chat-window::after { position: absolute; top: -120px; left: 0; right: 0; height: 120px; z-index: 5; pointer-events: none; content: ''; background: linear-gradient(180deg, transparent 0%, #c4b3ff0d 70%, #e6dbff4d 98%, transparent 100%); animation: chat-scan 900ms cubic-bezier(.45, 0, .2, 1) 40ms both; }
@keyframes chat-scan { to { top: 100%; } }
.chat-mode .chat-sync-tag { justify-self: center; display: flex; align-items: center; gap: 7px; color: #b9a9ff; font-size: 10px; letter-spacing: .2em; }
.chat-mode .chat-sync-tag i { width: 16px; height: 3px; border-radius: 2px; background: #8d78e6; animation: chat-sync 1.2s ease-in-out infinite; }
.chat-mode .chat-sync-tag i:nth-of-type(2) { animation-delay: .15s; }
.chat-mode .chat-sync-tag i:nth-of-type(3) { animation-delay: .3s; }
.chat-mode .chat-sync-tag i:nth-of-type(4) { animation-delay: .45s; }
@keyframes chat-sync { 0%, 100% { opacity: .2; transform: scaleX(.5); } 50% { opacity: 1; transform: scaleX(1); } }
.chat-mode .operator-chat-list.chat-revealing > * { animation: chat-reveal-item 620ms cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 85ms); }
@keyframes chat-reveal-item { from { opacity: 0; filter: blur(6px); transform: translateY(14px) scale(.985); } to { opacity: 1; filter: blur(0); transform: none; } }
.chat-mode .chat-empty-state.is-loading .chat-empty-label { color: #958d91; }
@keyframes chat-empty-orbit { to { transform: rotate(360deg); } }
@keyframes chat-empty-glow { 0%, 100% { opacity: .58; transform: scale(.88); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes chat-empty-core { 0%, 100% { filter: saturate(.92); transform: scale(.94); box-shadow: 0 0 7px 2px #f0705c80, 0 0 20px 7px #d342376b, 0 0 40px 12px #a82d3224, inset 0 1px 3px #ffe0c58c; } 50% { filter: saturate(1.18); transform: scale(1.08); box-shadow: 0 0 10px 3px #ff8c70bf, 0 0 27px 10px #dd493b99, 0 0 50px 17px #a82d3240, inset 0 1px 4px #fff0d3c9; } }
@keyframes chat-empty-signal { 0%, 100% { opacity: .38; top: 14px; left: 40px; } 25% { opacity: .88; top: 38px; left: 61px; } 50% { opacity: .52; top: 61px; left: 39px; } 75% { opacity: .92; top: 39px; left: 17px; } }
.chat-mode .chat-composer { width: 100%; margin: 0 auto; padding: 10px; border: 1px solid #414247; border-radius: 18px; background: #202125; box-shadow: 0 8px 28px #0003; }
.chat-mode .chat-compose-row { display: flex; align-items: end; gap: 10px; min-width: 0; }
.chat-mode .chat-compose-row textarea { flex: 1; min-width: 0; resize: vertical; min-height: 48px; max-height: 220px; padding: 12px 14px; border: 0; border-radius: 12px; outline: none; background: transparent; color: #f4f4f5; font-size: 15px; line-height: 1.5; font-family: inherit; }
.chat-mode .chat-compose-row textarea::placeholder { color: #9a9ba3; }
.chat-mode .chat-compose-row textarea:focus-visible { outline: 0; box-shadow: inset 0 -1px 0 #b96a5d55; background: linear-gradient(180deg, #ffffff02, #ffffff05); }
.chat-mode .chat-model-choice { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 4px 0 0 45px; color: #8f9097; }
.chat-mode .chat-model-choice label { margin: 0; color: #8f9097; font-size: 10px; font-weight: 500; }
.chat-mode .chat-model-choice select { width: min(240px, 52vw); min-height: 24px; padding: 2px 22px 2px 6px; border: 1px solid #393a40; border-radius: 6px; background: #222328; color: #b6b5bb; font-size: 10px; }
.chat-mode .chat-model-choice select:focus-visible { outline: 1px solid #a8665e; outline-offset: 1px; }
.model-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.model-chip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; min-width: 0; padding: 10px 12px; border: 1px solid #393a40; border-radius: 11px; background: #202125; color: #e9e7e8; }
.model-chip-copy { display: grid; min-width: 0; }
.model-chip-copy b, .model-chip-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-chip-copy small { color: #96939a; font-size: 10px; }
.model-chip-state { color: #96939a; font-size: 10px; white-space: nowrap; }
.model-chip-running { border-color: #66514f; background: #252326; }
.model-led { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border: 1px solid #696970; border-radius: 50%; background: transparent; vertical-align: 1px; }
.model-led.is-on { border-color: #d16b60; background: #c65c52; box-shadow: 0 0 4px #c65c5280; }
.model-led.is-loading { border-color: #e0bc62; background: #e0bc62; box-shadow: 0 0 5px #e0bc6280; animation: model-led-pulse 1s ease-in-out infinite alternate; }
@keyframes model-led-pulse { to { opacity: .45; } }
.model-chip-actions { display: flex; gap: 5px; }
.model-chip-actions button { min-width: 28px; height: 28px; margin: 0; padding: 0 7px; border: 1px solid #414047; border-radius: 8px; background: #2a292e; color: #d9d5dc; font-size: 12px; }
.model-chip-actions button:hover { border-color: #7b6866; background: #343034; }
.model-chip-actions button:disabled { opacity: .45; cursor: wait; }
.chat-mode .chat-compose-row button { flex: 0 0 auto; min-height: 42px; margin: 0; padding: 10px 17px; border-radius: 12px; background: #7a68d8; color: #fff; }
.chat-mode .chat-context { margin-bottom: 6px; color: #c5c6cc; }
.chat-mode .chat-context summary { width: fit-content; padding: 7px 9px; border-radius: 9px; color: #c5c6cc; cursor: pointer; font-size: 13px; }
.chat-mode .chat-context summary:hover, .chat-mode .chat-context summary:focus-visible { background: #2d2e33; outline: 2px solid #9081ed; outline-offset: 1px; }
.chat-mode .chat-context[open] { max-height: min(38vh, 330px); overflow: auto; padding-bottom: 8px; border-bottom: 1px solid #393a3f; }
.chat-mode #github-chat-context { max-width: 640px; padding: 0 9px; }
.chat-mode #github-chat-context label { color: #b9bac1; }
.chat-mode #github-chat-context input, .chat-mode #github-chat-context select { border-color: #44454b; background: #292a2f; color: #f0f0f3; }
.chat-mode #github-chat-context .ghost { border: 1px solid #45464b; background: #2b2c31; color: #e5e5e9; }
.chat-mode .chat-context-help { margin: 7px 0; color: #a6a7ae; font-size: 12px; }
.chat-mode .chat-context-success { color: #9be0b3; font-size: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) { .chat-mode #operator-chat-window { padding: 18px 12px 12px; }.chat-mode .chat-header { padding-bottom: 13px; }.chat-mode .operator-chat-list { padding: 18px 2px; }.chat-mode .chat-message { max-width: 100%; }.chat-mode #map-window-close { top: 10px; right: 10px; } }
.command-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.command-tabs button { margin: 0; padding: 7px 10px; border: 1px solid #d7c9b8; border-radius: 8px; background: #fff8e8; color: #51493f; cursor: pointer; }
.command-tabs button.active { background: #7a5af8; border-color: #7a5af8; color: #fff; }
.command-zones { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(260px, 1.5fr) minmax(120px, .65fr); gap: 12px; }
.command-history, .command-context { min-width: 0; padding: 12px; border-radius: 10px; background: #f7f1e8; }
@media (max-width: 700px) { .command-zones { grid-template-columns: 1fr; } .command-history, .command-context { max-height: 90px; overflow: auto; } }

/* Las secciones operativas se presentan dentro del mismo espacio de chat. */
#analysis-window { display: none; }
.chat-mode #operator-chat-window { width: 100%; }
.chat-mode .command-tabs-row { display: flex; min-width: 0; align-items: stretch; gap: 8px; margin-top: 10px; border-bottom: 1px solid #303136; }
.chat-mode .command-tabs { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 4px; margin: 0; overflow: visible; border-bottom: 0; }
.chat-mode .command-tabs button { flex: 0 0 auto; margin: 0 0 -1px; padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: transparent; color: #aaaab2; font: inherit; font-size: 13px; }
.chat-mode .command-tabs button:hover, .chat-mode .command-tabs button:focus-visible { background: #25262a; color: #f2f2f3; outline: 2px solid #9081ed; outline-offset: -2px; }
.chat-mode .command-tabs button.active { border-bottom-color: #9b8af0; background: transparent; color: #f2f2f3; }
.chat-mode .chat-new-conversation-nav { display: inline-flex; width: max-content; max-width: 100%; flex: 0 0 auto; align-self: center; align-items: center; justify-content: center; gap: 6px; margin: 0 3px 0 auto; padding: 6px 10px; border: 1px solid #51403e; border-radius: 8px; background: linear-gradient(135deg, #34292b, #29272b); color: #e3ceca; font: inherit; font-size: 11px; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.chat-mode .chat-new-conversation-nav[hidden] { display: none; }
.chat-mode .chat-new-conversation-nav > span:first-child { color: #c47c70; font-size: 14px; line-height: 1; }
.chat-mode .chat-new-conversation-nav:hover:not(:disabled), .chat-mode .chat-new-conversation-nav:focus-visible { border-color: #80544c; outline: 0; background: #382e30; transform: translateY(-1px); }
.chat-mode .chat-new-conversation-nav:disabled { opacity: .55; cursor: wait; }
.chat-mode .command-workspace { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.chat-mode .command-chat-pane, .chat-mode .command-panel-slot { flex: 1 1 auto; min-width: 0; min-height: 0; }
.chat-mode .command-chat-pane { display: flex; flex-direction: column; }
.chat-mode .command-panel-slot { overflow: auto; padding: 22px 4px 30px; }
.chat-mode .command-panel-slot, .chat-mode .command-panel-slot * { scrollbar-width: none; }
.chat-mode .command-panel-slot::-webkit-scrollbar, .chat-mode .command-panel-slot *::-webkit-scrollbar { display: none; }
.chat-mode .command-panel-slot[hidden], .chat-mode .command-chat-pane[hidden] { display: none !important; }
.chat-mode .command-panel-slot > #tickets-window { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); align-content: start; gap: 14px; margin: 0; }
.chat-mode .command-panel-slot > #tickets-window { grid-template-columns: minmax(0, 1fr); }
.chat-mode .command-panel-slot > #analysis-window, .chat-mode .command-panel-slot > #calendar-window, .chat-mode .command-panel-slot > #approvals-window, .chat-mode .command-panel-slot > #activity-window { display: block; margin: 0 0 14px; padding: 18px; border: 1px solid #34353a; border-radius: 14px; background: #202125; color: #ececf1; box-shadow: none; }
.chat-mode .command-panel-slot > #activity-window { margin-top: 14px; }
.chat-mode .command-panel-slot > #models-window, .chat-mode .command-panel-slot > #credentials-window { display: block; margin: 0 0 14px; padding: 0; border: 0; background: transparent; color: #ececf1; }
.chat-mode .command-panel-slot .panel-title { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #34353a; }
.chat-mode .command-panel-slot .panel-title h2, .chat-mode .command-panel-slot h2, .chat-mode .command-panel-slot h3, .chat-mode .command-panel-slot h4 { color: #f1f1f3; }
.chat-mode .command-panel-slot .eyebrow, .chat-mode .command-panel-slot .muted { color: #a6a7ae; }
.chat-mode .command-panel-slot .panel, .chat-mode .command-panel-slot .create-panel, .chat-mode .command-panel-slot #modelos, .chat-mode .command-panel-slot #rrss { padding: 18px; border: 1px solid #34353a; border-radius: 14px; background: #202125; color: #ececf1; box-shadow: none; }
.chat-mode .command-panel-slot .ticket, .chat-mode .command-panel-slot .social-item, .chat-mode .command-panel-slot .approval-item, .chat-mode .command-panel-slot .calendar-entry, .chat-mode .command-panel-slot .event { border-color: #393a40; background: #26272b; color: #ededf0; }
.chat-mode .command-panel-slot .ticket p, .chat-mode .command-panel-slot .social-item p, .chat-mode .command-panel-slot .approval-item p, .chat-mode .command-panel-slot .calendar-entry p, .chat-mode .command-panel-slot .event { color: #b5b6bd; }
.chat-mode .command-panel-slot input, .chat-mode .command-panel-slot textarea, .chat-mode .command-panel-slot select { border-color: #44454b; background: #292a2f; color: #f0f0f3; }
.chat-mode .command-panel-slot button.ghost { border: 1px solid #45464b; background: #2b2c31; color: #e5e5e9; }
.chat-mode .command-panel-slot .report-result { border-color: #45464b; background: #292a2f; color: #ececf1; }
.chat-mode .command-panel-slot .calendar-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #393a40; border-radius: 10px; }
.chat-mode .command-panel-slot .calendar-entry p { margin: 3px 0 0; font-size: 12px; }
.chat-mode .command-panel-slot .calendar-list { display: grid; gap: 8px; }
.chat-mode .command-panel-slot .social-calendar-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin: 16px 0 24px; }
.chat-mode .command-panel-slot .social-calendar-form button { margin: 0; min-height: 42px; }
.chat-mode .command-panel-slot .provider-strip { border-color: #414247; background: #25262a; }
.chat-mode .command-panel-slot .provider-strip button { color: #c4c5cb; }
.chat-mode .command-panel-slot .provider-strip button.active { background: #34353b; color: #f4f4f5; }
@media (max-width: 760px) {
  .chat-mode #operator-chat-window { padding-right: 12px; padding-left: 12px; }
  .chat-mode .command-panel-slot > #tickets-window { grid-template-columns: 1fr; }
  .chat-mode .command-panel-slot .social-calendar-form { grid-template-columns: 1fr; }
  .chat-mode .command-tabs button { padding: 9px 10px; font-size: 12px; }
  .chat-mode .chat-new-conversation-nav { gap: 5px; padding: 6px 8px; font-size: 10px; }
}

/* Navegación y composición de chat integradas en la oficina vigente. */
.chat-mode .command-panel-slot > #agents-window { display: block; margin: 0; padding: 18px; border: 1px solid #34353a; border-radius: 14px; background: #202125; color: #ececf1; box-shadow: none; }
.chat-mode .agent-chat-detail { position: relative; margin-top: 16px; padding: 18px; border: 1px solid #3c3d43; border-radius: 14px; background: #25262a; }
.chat-mode .agent-chat-detail.hidden { display: none; }
.chat-mode .agent-chat-detail .popup-close { float: right; width: 34px; height: 34px; margin: 0; border: 1px solid #45464b; border-radius: 10px; background: #303136; color: #eee; font-size: 20px; }
.chat-mode .agent-chat-detail h2 { color: #f4f4f5; }
.chat-mode .agent-chat-detail label { display: block; margin: 12px 0; color: #c7c8ce; }
.chat-mode .agent-chat-detail .agent-avatar { display: inline-grid; margin-right: 10px; vertical-align: middle; }
.chat-mode .vision-declaration { display: flex !important; align-items: flex-start; gap: 9px; max-width: 560px; padding: 10px 12px; border: 1px solid #45464b; border-radius: 10px; background: #292a2f; line-height: 1.4; }
.chat-mode .vision-declaration input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #9b8af0; }
.chat-mode .agent-directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.chat-mode .agent-directory-item { min-height: 58px; padding: 9px 11px; border: 1px solid #3b3c41; border-radius: 11px; background: #26272b; color: #eeeef1; text-align: left; }
.chat-mode .agent-directory-item:hover, .chat-mode .agent-directory-item:focus-visible { border-color: #8f80dc; background: #303136; outline: 2px solid #8f80dc; outline-offset: 1px; }
.chat-mode .chat-draft-context { display: grid; gap: 8px; }
.chat-mode .github-chat-context { min-width: 0; }
.chat-mode .github-reference-chips, .chat-mode .attachment-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.chat-mode .github-reference-chip, .chat-mode .attachment-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 32px; padding: 4px 7px; border: 1px solid #414248; border-radius: 9px; background: #292a2f; color: #d8d8dd; font-size: 12px; }
.chat-mode .github-reference-chip > span, .chat-mode .attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .github-reference-chip button, .chat-mode .attachment-chip button { width: 22px; height: 22px; min-width: 22px; margin: 0; padding: 0; border-radius: 6px; background: transparent; color: #c2c3ca; font-size: 17px; }
.chat-mode .github-reference-chip button:hover, .chat-mode .attachment-chip button:hover { background: #45464b; }
.chat-mode .github-add-reference { min-height: 32px; margin: 0; padding: 5px 9px; border: 1px dashed #53545b; border-radius: 9px; background: transparent; color: #c5c3ef; font-size: 12px; }
.chat-mode .chat-social-mode { color: #c4a5aa; }
.chat-mode .chat-social-mode.active { border-style: solid; border-color: #765255; background: #34292d; color: #e2c1c5; }
.chat-mode .chat-social-test.active { border-style: solid; border-color: #765255; background: #34292d; color: #e2c1c5; box-shadow: inset 0 -1px #a8665e55; }
.chat-mode .chat-social-platforms { display: inline-flex; align-items: center; gap: 4px; }
.chat-mode .chat-social-platforms[hidden] { display: none; }
.chat-mode .social-platform-chip { display: inline-grid; width: 29px; min-width: 29px; height: 28px; min-height: 28px; place-items: center; margin: 0; padding: 5px; border: 1px solid #45434a; border-radius: 8px; background: #28292e; color: #a9a8b0; transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease; }
.chat-mode .social-platform-chip svg { width: 16px; height: 16px; }
.chat-mode .social-platform-chip:hover, .chat-mode .social-platform-chip:focus-visible { border-color: #76605f; outline: 0; color: #e4ced0; transform: translateY(-1px); }
.chat-mode .social-platform-chip[aria-pressed="true"] { border-color: #956b70; background: #3a2d31; color: #f0cbd0; box-shadow: inset 0 0 0 1px #956b7033; }
.chat-mode .github-project-picker-wrap { position: relative; display: inline-flex; }
.chat-mode .github-project-picker { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 8px); display: grid; gap: 3px; width: min(340px, calc(100vw - 32px)); max-height: min(340px, 52vh); overflow-y: auto; overflow-x: hidden; padding: 5px; border: 1px solid #414247; border-radius: 12px; background: #202125; box-shadow: 0 12px 32px #0009; scrollbar-width: none; }
.chat-mode .github-project-picker[hidden] { display: none; }
.chat-mode .github-project-picker::-webkit-scrollbar { display: none; }
select { color-scheme: dark; }
select option, select optgroup { background-color: #25262b; color: #e7e4e6; }
.chat-mode .github-project-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; min-height: 34px; margin: 0; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: #d7d5d8; font: inherit; font-size: 12px; font-weight: 400; text-align: left; }
.chat-mode .github-project-option:hover, .chat-mode .github-project-option:focus-visible, .chat-mode .github-project-option[aria-pressed="true"] { background: #303136; color: #f0edef; outline: none; }
.chat-mode .github-project-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .github-project-option small { flex: 0 0 auto; color: #96949a; font-size: 10px; font-weight: 400; }
.chat-mode .github-project-option.is-new { color: #c9897e; }
.chat-mode .github-projects-empty { margin: 0; padding: 9px; color: #96949a; font-size: 11px; }
.chat-mode .chat-create-ticket.active { border-color: #77524b; background: #332a2b; color: #d6a199; }
.chat-mode .chat-create-ticket:disabled { opacity: .38; cursor: not-allowed; }
.chat-mode .chat-create-ticket.active { border-style: solid; border-color: #77524b; background: #332a2b; color: #d6a199; }
.chat-mode .chat-ticket-critical-chip { border-color: #765a54; color: #c4a49d; }
.chat-mode .chat-ticket-critical-chip.active { border-style: solid; border-color: #a14e45; background: #56312f; color: #efb1a7; }
.chat-mode .attachment-chip { max-width: min(100%, 320px); }
.chat-mode .attachment-chip img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.chat-mode .attachment-chip small { flex: 0 0 auto; color: #9b9ca4; }
.chat-mode .attachment-chip .attachment-audio-status { color: #aaa9b2; font-size: 10px; letter-spacing: .01em; }
.chat-mode .attachment-chip .attachment-audio-status[data-audio-status="transcribing"], .chat-mode .attachment-chip .attachment-audio-status[data-audio-status="sending"] { color: #d8b77d; }
.chat-mode .attachment-chip .attachment-audio-status[data-audio-status="failed"] { color: #d88d8d; }
.chat-mode .attachment-chip.expired { color: #9b9ca4; border-style: dashed; }
.chat-mode .message-attachments { margin-top: 10px; }
.chat-mode .chat-composer { position: relative; }
.chat-mode .chat-compose-row { align-items: center; }
.chat-mode .chat-attach-button { display: grid; place-items: center; flex: 0 0 38px; height: 38px; margin: 0; border: 1px solid #414247; border-radius: 11px; background: #2a2b30; color: #e6e6ea; font-size: 24px; cursor: pointer; }
.chat-mode .chat-attach-button:hover, .chat-mode .chat-attach-button:focus-visible { background: #3a3b42; outline: 2px solid #9081ed; outline-offset: 1px; }
.chat-mode .chat-compose-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px 0; color: #85868e; font-size: 11px; }
.chat-mode .chat-quota { display: grid; flex: 0 0 auto; grid-template-columns: max-content 86px; align-items: center; gap: 8px; color: #85868e; font-size: 10px; white-space: nowrap; }
.chat-mode .chat-quota-track { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: #3a3b40; }
.chat-mode .chat-quota-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: #a64a3a; transition: width .2s ease, background-color .2s ease; }
.chat-mode .chat-quota.near-limit .chat-quota-track > span { background: #c78b5d; }
.chat-mode .chat-quota.at-limit .chat-quota-track > span { background: #c86961; }
.chat-mode .chat-main-column { position: relative; min-width: 0; overflow: hidden; }
.chat-mode .chat-transcript { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; }
.chat-mode .chat-transcript::before, .chat-mode .chat-transcript::after { position: absolute; z-index: 3; right: 0; left: 0; display: block; content: ''; pointer-events: none; }
.chat-mode .chat-transcript::before { top: 0; height: 38px; background: linear-gradient(180deg, rgba(24, 25, 27, .96), rgba(24, 25, 27, 0)); }
.chat-mode .chat-transcript::after { bottom: -12px; height: 58px; background: linear-gradient(180deg, rgba(24, 25, 27, 0), rgba(24, 25, 27, .72) 55%, rgba(32, 33, 37, .92)); }
.chat-mode .chat-transcript .operator-chat-list { height: 100%; flex: none; }
.chat-mode .chat-composer { z-index: 2; border-top-color: transparent; background: linear-gradient(180deg, rgba(32, 33, 37, .84), #202125 30px); box-shadow: 0 8px 28px #0003; }
.chat-mode .chat-scroll-to-bottom { position: absolute; z-index: 8; left: 50%; bottom: 12px; display: grid; width: 34px; height: 34px; place-items: center; margin: 0; padding: 0; border: 1px solid #4a494d; border-radius: 50%; background: #28292de8; color: #d8d7db; box-shadow: 0 4px 16px #0008; opacity: .9; transform: translateX(-50%); }
.chat-mode .chat-scroll-to-bottom[hidden] { display: none; }
.chat-mode .chat-scroll-to-bottom:hover { background: #3b3b40; box-shadow: 0 6px 20px #000b; }
.chat-mode .chat-live-response { display: grid; justify-items: start; gap: 7px; }
.chat-mode .chat-thinking { display: flex; align-items: center; gap: 4px; height: 14px; color: #b8a8a8; }
.chat-mode .chat-thinking span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: chat-dot-bounce .9s ease-in-out infinite; }
.chat-mode .chat-thinking span:nth-child(2) { animation-delay: .14s; }
.chat-mode .chat-thinking span:nth-child(3) { animation-delay: .28s; }
@keyframes chat-dot-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-mode .chat-generate-idea { position: relative; isolation: isolate; min-width: 64px; min-height: 28px !important; overflow: hidden; padding: 4px 8px !important; border: 1px solid #5a4948; border-radius: 8px !important; background: #29282b !important; color: #c5aaa7 !important; font-size: 11px !important; box-shadow: none !important; touch-action: none; }
.chat-mode .chat-generate-idea { background: linear-gradient(90deg, #69382f99 var(--hold-progress, 0%), #29282b var(--hold-progress, 0%)) !important; }
.chat-mode .chat-generate-idea.holding { border-color: #a65e52; color: #f0dcda !important; }
.chat-mode .chat-generate-idea:disabled { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .chat-mode .chat-thinking span { animation: none; opacity: .8; }.chat-mode .chat-quota-track > span { transition: none; } }
.chat-mode .chat-composer.dragging { border-color: #a091f3; outline: 3px solid #8f80dc55; }
.chat-mode .chat-composer.dragging::after { position: absolute; inset: 8px; display: grid; place-items: center; border: 2px dashed #a091f3; border-radius: 12px; background: #18191bdd; color: #f3f1ff; content: 'Suelta los archivos para adjuntarlos'; pointer-events: none; }
.chat-mode .github-mention-picker { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 8px); display: grid; gap: 3px; width: min(340px, calc(100vw - 32px)); max-height: min(340px, 52vh); overflow: hidden; padding: 5px; border: 1px solid #414247; border-radius: 12px; background: #202125; box-shadow: 0 12px 32px #0009; color: #e9e9ed; }
.chat-mode .github-mention-picker[hidden] { display: none; }
.chat-mode .github-mention-heading { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 4px 2px 9px; color: #96949a; font-size: 11px; }
.chat-mode .github-mention-heading button { min-height: 28px; margin: 0; padding: 3px 8px; border: 1px solid #44454b; border-radius: 8px; background: #2a2b30; color: #ddd; }
.chat-mode .github-mention-options { display: grid; gap: 3px; min-height: 0; max-height: min(300px, 46vh); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.chat-mode .github-mention-options::-webkit-scrollbar { display: none; }
.chat-mode .github-mention-options [role="option"] { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 34px; margin: 0; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: #d7d5d8; font-size: 12px; text-align: left; }
.chat-mode .github-mention-options [role="option"]:hover, .chat-mode .github-mention-options [role="option"][aria-selected="true"] { background: #303136; color: #f0edef; }
.chat-mode .github-mention-options [role="option"] > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .github-mention-options [role="option"] small { flex: 0 0 auto; color: #96949a; font-size: 10px; }
.chat-mode .github-mention-group { padding: 8px 10px 3px; color: #92939b; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chat-mode .github-file-option-copy { display: grid; min-width: 0; gap: 3px; }
.chat-mode .github-file-option-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .github-file-option-copy > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .github-mention-options > .muted { margin: 10px; padding: 8px 4px; color: #a6a7ae; }
.chat-mode .github-mention-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; color: #ffc1bd; font-size: 13px; }
.chat-mode .github-mention-error button { flex: 0 0 auto; margin: 0; padding: 6px 10px; border: 1px solid #55565d; border-radius: 8px; background: #2a2b30; color: #f1f1f3; }
.chat-mode .github-path-option { display: flex; align-items: center; gap: 5px; }
.chat-mode .github-path-option [role="option"] { flex: 1; }
.chat-mode .github-path-option .pin-folder { width: 34px; height: 32px; min-width: 34px; margin: 0; padding: 0; border: 1px solid #44454b; border-radius: 8px; background: #292a2f; color: #ddd; }
.chat-mode .github-mention-help { margin: 0; padding: 6px 9px 4px; border-top: 1px solid #36373d; color: #8f9098; font-size: 10px; }
.chat-mode .chat-compose-row textarea { min-width: 0; }
.chat-mode .chat-compose-row textarea { resize: none; overflow-y: hidden; min-height: 36px; }
.chat-mode button:focus-visible, .chat-mode a:focus-visible, .chat-mode input:focus-visible, .chat-mode select:focus-visible { outline: 2px solid #a091f3; outline-offset: 2px; }
@media (max-width: 600px) {
  .chat-mode .chat-compose-hint { display: none; }
  .chat-mode .chat-attach-button { flex-basis: 34px; width: 34px; height: 34px; }
  .chat-mode .github-mention-picker { width: auto; right: 4px; left: 4px; }
  .chat-mode .github-mention-options [role="option"] { gap: 6px; }
}

/* El chat usa jerarquía por escala y grises, sin texto en negrita. */
.chat-mode #operator-chat-window :is(h1, h2, h3, h4, b, strong, button, label, summary, small, [role="tab"], [role="option"]) { font-weight: 400; }
.chat-mode #operator-chat-window :is(h1, h2, h3, h4) { color: #dedee2; }
.chat-mode .chat-message b { color: #92939b; }
.chat-mode .github-mention-group { font-weight: 400; color: #92939b; }
.chat-mode .github-file-option-copy > span { color: #e0e0e4; }
.chat-mode .github-file-option-copy > small { color: #92939b; }
.chat-mode .chat-compose-row .chat-record-audio { display: grid; width: 42px; min-width: 42px; min-height: 42px; place-items: center; padding: 0; border: 1px solid #414247; border-radius: 12px; background: #292a2f; color: #c7c8ce; font-size: 18px; }
.chat-mode .chat-compose-row .chat-record-audio:hover { background: #36373d; }
.chat-mode .chat-compose-row .chat-record-audio[aria-pressed="true"] { border-color: #69616a; background: #3b343a; color: #e1cbd5; }
.chat-mode .chat-compose-row .chat-record-audio:disabled { opacity: .65; cursor: wait; }
.chat-mode .attachment-chip audio { width: min(260px, 54vw); height: 32px; }
.chat-mode audio { color-scheme: dark; }
.chat-mode #chat-recording-status { color: #9798a0; }
@media (max-width: 600px) {
  .chat-mode .chat-compose-hint { display: flex; font-size: 10px; }
  .chat-mode .chat-compose-hint > span:last-child { display: none; }
  .chat-mode .chat-compose-row .chat-record-audio { width: 36px; min-width: 36px; min-height: 38px; }
}

/* Espaciado compacto del chat y acciones de baja prominencia. */
.chat-mode #operator-chat-window { padding: 14px 18px 12px; }
.chat-mode #map-window-close { top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; }
.chat-mode .chat-header { padding-bottom: 9px; }
.chat-mode .chat-header h2 { font-size: 18px; }
.chat-mode .operator-chat-list { padding: 14px 6px 12px; }
.chat-mode .operator-chat-list { row-gap: 8px; }
.chat-mode .chat-message { padding: 9px 12px; border-radius: 14px; line-height: 1.45; }
.chat-mode .chat-message b { margin-bottom: 2px; }
.chat-mode .chat-composer { padding: 5px; border-radius: 14px; }
.chat-mode .chat-draft-context { gap: 4px; }
.chat-mode .github-reference-chips, .chat-mode .attachment-chips { gap: 4px; }
.chat-mode .github-reference-chip, .chat-mode .attachment-chip { min-height: 27px; gap: 5px; padding: 2px 6px; border-radius: 7px; }
.chat-mode .github-reference-chip button, .chat-mode .attachment-chip button { width: 22px; height: 22px; min-width: 22px; }
.chat-mode .github-add-reference { min-height: 28px; padding: 3px 7px; border-radius: 7px; }
.chat-mode .social-platform-chip { width: 27px; min-width: 27px; height: 27px; min-height: 27px; padding: 4px; }
.chat-mode .social-platform-chip svg { width: 15px; height: 15px; }
.chat-mode .chat-compose-row { gap: 6px; }
.chat-mode .chat-compose-row textarea { min-height: 38px; max-height: 180px; padding: 7px 9px; line-height: 1.4; }
.chat-mode .chat-compose-row button { min-height: 38px; padding: 7px 13px; border-radius: 10px; }
.chat-mode .chat-compose-row button[type="submit"] { min-height: 32px; padding: 5px 10px; border-radius: 8px; background: #57516f; color: #e8e6f1; font-size: 13px; box-shadow: none; }
.chat-mode .chat-compose-row button[type="submit"]:hover:not(:disabled) { background: #655d83; color: #f4f2ff; }
.chat-mode .chat-attach-button { flex-basis: 32px; width: 32px; height: 32px; border-color: transparent; border-radius: 8px; background: transparent; color: #a5a6ae; font-size: 20px; }
.chat-mode .chat-attach-button:hover { background: #292a2f; color: #d4d4da; }
.chat-mode .chat-compose-row .chat-record-audio { width: 32px; min-width: 32px; min-height: 32px; border-color: transparent; border-radius: 8px; background: transparent; color: #a5a6ae; font-size: 15px; }
.chat-mode .chat-compose-row .chat-record-audio:hover { background: #292a2f; color: #d4d4da; }
.chat-mode .chat-compose-row .chat-record-audio[aria-pressed="true"] { border-color: #5c5361; background: #343039; color: #dfcbdc; }
.chat-mode .chat-compose-hint { gap: 5px; padding: 1px 5px 0; font-size: 10px; line-height: 1.3; }
.chat-mode .message-attachments { margin-top: 6px; }
@media (max-width: 600px) {
  .chat-mode #operator-chat-window { padding: 10px 8px 8px; }
  .chat-mode .chat-header { padding-right: 44px; padding-bottom: 7px; }
  .chat-mode .operator-chat-list { padding: 10px 2px 8px; }
  .chat-mode .chat-composer { padding: 4px; }
  .chat-mode .chat-compose-row { gap: 4px; }
  .chat-mode .chat-compose-row textarea { min-height: 36px; padding: 6px 7px; font-size: 14px; }
  .chat-mode .chat-compose-row button { min-height: 34px; padding: 5px 9px; }
  .chat-mode .chat-compose-row button[type="submit"] { min-height: 30px; padding: 4px 8px; }
  .chat-mode .chat-attach-button { flex-basis: 30px; width: 30px; height: 30px; }
  .chat-mode .chat-compose-row .chat-record-audio { width: 30px; min-width: 30px; min-height: 30px; }
}

/* El panel emerge del dock sin convertir ambos controles en una sola pieza. */
.chat-mode #map-window::after { position: absolute; z-index: 2; bottom: 0; left: 50%; width: clamp(64px, 8vw, 112px); height: 2px; border-radius: 50%; background: linear-gradient(90deg, transparent, #ad98ff, #d7caff, #ad98ff, transparent); box-shadow: 0 0 14px #9c82ff99; content: ''; pointer-events: none; transform: translateX(-50%); transform-origin: center; animation: chat-seam-glow 640ms ease-out both; }
.chat-mode #room-navigation .v08-chat-button.active::after { position: absolute; inset: -5px; border: 1px solid #b6a3ff; border-radius: 19px; content: ''; opacity: 0; pointer-events: none; animation: chat-dock-pulse 620ms cubic-bezier(.16, 1, .3, 1) both; }
.chat-mode .chat-content-shell { animation: chat-content-in 460ms cubic-bezier(.16, 1, .3, 1) 90ms both; }
.chat-mode .chat-composer { animation: chat-content-in 460ms cubic-bezier(.16, 1, .3, 1) 180ms both; }
@keyframes chat-content-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-mode .chat-skeleton { display: grid; gap: 14px; width: min(100%, 720px); margin: 0 auto; padding-top: 28px; }
.chat-mode .chat-skeleton-bubble { display: block; width: 58%; height: 46px; border-color: #b9a6ff2e; border-radius: 16px; background: linear-gradient(105deg, #26242e 24%, #34304a 38%, #26242e 54%); box-shadow: inset 0 1px #ffffff0d, 0 0 22px -8px #8d78e6; animation: chat-skeleton-in 380ms cubic-bezier(.2, .75, .25, 1) both; }
.chat-mode .chat-skeleton-bubble.is-user { justify-self: end; width: 42%; height: 40px; }
.chat-mode .chat-skeleton-bubble.is-assistant { justify-self: start; }
.chat-mode .chat-skeleton-bubble.wide { width: 74%; height: 78px; }
.chat-mode .chat-skeleton-bubble:nth-child(2) { animation-delay: 80ms; }
.chat-mode .chat-skeleton-bubble:nth-child(3) { animation-delay: 160ms; }
.chat-mode .github-skeleton-chip { display: inline-block; width: 180px; height: 30px; border-radius: 999px; animation: chat-skeleton-in 380ms cubic-bezier(.2, .75, .25, 1) both; }
@keyframes chat-skeleton-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chat-emerge {
  0% { opacity: 0; filter: blur(9px); transform: translate(-50%, 26px) scale(.985); }
  62% { opacity: 1; filter: blur(1px); }
  100% { opacity: 1; filter: blur(0); transform: translate(-50%, 0) scale(1); }
}
@keyframes chat-seam-glow {
  0% { opacity: 0; transform: translateX(-50%) scaleX(.2); }
  42% { opacity: .95; transform: translateX(-50%) scaleX(1); }
  100% { opacity: .65; transform: translateX(-50%) scaleX(1); }
}
@keyframes chat-dock-pulse {
  0% { opacity: 0; transform: scale(.82); }
  32% { opacity: .8; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.15); }
}

.chat-mode .chat-generation-meta, .chat-mode .chat-generation-error { margin-top: 8px; color: #a4a6af; font-size: 12px; }
.chat-mode .chat-generation-error { color: #d19b9b; }
.chat-mode .chat-generation-error button { margin-left: 6px; padding: 2px 7px; border: 1px solid #565860; border-radius: 7px; background: #2b2c31; color: #d9d6e8; font: inherit; cursor: pointer; }
.chat-mode .chat-source-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chat-mode .chat-source-list a { max-width: 100%; padding: 3px 7px; overflow: hidden; border: 1px solid #393a40; border-radius: 7px; color: #aaa7c4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .chat-message-content > :first-child { margin-top: 0; }
.chat-mode .chat-message-content > :last-child { margin-bottom: 0; }
.chat-mode .chat-message-content h1, .chat-mode .chat-message-content h2, .chat-mode .chat-message-content h3, .chat-mode .chat-message-content h4 { margin: 14px 0 6px; color: #e0dfe5; font-size: 15px; font-weight: 400; line-height: 1.35; }
.chat-mode .chat-message-content p { margin: 6px 0; }
.chat-mode .chat-message-content ul, .chat-mode .chat-message-content ol { margin: 6px 0; padding-left: 22px; }
.chat-mode .chat-message-content li { margin: 3px 0; }
.chat-mode .chat-message-content code { padding: 1px 4px; border-radius: 4px; background: #18191c; color: #d2cce8; font-family: Consolas, 'Courier New', monospace; font-size: .92em; }
.chat-mode .chat-message-content pre { box-sizing: border-box; width: 100%; max-width: 100%; margin: 8px 0; padding: 9px 11px; overflow-x: hidden; border: 1px solid #383940; border-radius: 8px; background: #17181b; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat-mode .chat-message-content pre code { padding: 0; background: transparent; color: #d5d5dc; }
.chat-mode .chat-message-content :is(img, video, table) { max-width: 100%; }
.chat-mode .chat-message-content table { table-layout: fixed; overflow-wrap: anywhere; }
.chat-mode .chat-message-content :is(td, th, a) { overflow-wrap: anywhere; word-break: break-word; }
.chat-mode .chat-markdown-emphasis { color: #dedce5; font-weight: 400; }
.chat-mode .chat-markdown-table-wrap { box-sizing: border-box; width: 100%; max-width: 100%; margin: 8px 0; overflow: hidden; border: 1px solid #393a40; border-radius: 8px; }
.chat-mode .chat-markdown-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chat-mode .chat-markdown-table-wrap th, .chat-mode .chat-markdown-table-wrap td { padding: 6px 8px; border-bottom: 1px solid #393a40; text-align: left; vertical-align: top; font-weight: 400; }

/* Contenido y ajustes: superficies oscuras con el rojo terracota de la marca. */
.chat-mode .command-panel-slot #rrss .social-cards > div {
  border-color: #57403d;
  background: linear-gradient(145deg, #332624, #292629 66%, #232427);
  color: #ece5e3;
}
.chat-mode .command-panel-slot #rrss .social-icon { background: #a64a3a; color: #fff3ef; }
.chat-mode .command-panel-slot #rrss .social-cards h3 { color: #e8dfdc; }
.chat-mode .command-panel-slot #rrss .social-cards p { color: #b8ada9; }
.chat-mode .command-panel-slot #rrss .social-cards small { color: #c08b80; }
.chat-mode .command-panel-slot #rrss .social-workbench { border-color: #453638; }
.chat-mode .command-panel-slot #rrss .social-platform-field { display: grid; gap: 5px; margin: 4px 0; color: #c9bfbd; font-size: 12px; }
.chat-mode .command-panel-slot #rrss .social-platform-options { display: flex; align-items: center; gap: 6px; }
.chat-mode .command-panel-slot #rrss .social-platform-chip { width: 34px; min-width: 34px; height: 34px; min-height: 34px; border-color: #514448; background: #28272b; }
.chat-mode .command-panel-slot #rrss .social-platform-chip svg { width: 18px; height: 18px; }
.chat-mode .command-panel-slot #rrss .social-platform-chip.selected { border-color: #96676d; background: #3a2d31; color: #f0cbd0; }
.chat-mode .command-panel-slot #rrss label,
.chat-mode .command-panel-slot #credentials-window label { color: #c9bfbd; }
.chat-mode .command-panel-slot #modelos .provider {
  border: 1px solid #54403d;
  background: #30292a;
  color: #d2c5c2;
}
.chat-mode .command-panel-slot #modelos .provider.active {
  border-color: #b45a49;
  background: linear-gradient(145deg, #a64a3a, #823b32);
  color: #fff4f1;
}
.chat-mode .command-panel-slot #modelos .model-chip,
.chat-mode .command-panel-slot #credentials-window .credential-card {
  border-color: #51403e;
  background: linear-gradient(145deg, #302829, #272629 72%, #232427);
  color: #e8e2e0;
}
.chat-mode .command-panel-slot #modelos .model-chip small,
.chat-mode .command-panel-slot #credentials-window .credential-card p { color: #b6aaa7; }
.chat-mode .command-panel-slot #credentials-window input,
.chat-mode .command-panel-slot #credentials-window textarea,
.chat-mode .command-panel-slot #credentials-window select { border-color: #514442; background: #242427; color: #eee8e6; }
.chat-mode .command-panel-slot #rrss button[type="submit"],
.chat-mode .command-panel-slot #credentials-window button[type="submit"] {
  background: linear-gradient(145deg, #9b4538, #76362f);
  color: #fff2ef;
}
.chat-mode .command-panel-slot #rrss button[type="submit"]:hover,
.chat-mode .command-panel-slot #credentials-window button[type="submit"]:hover { background: #ad5141; }

.idea-transfer-dialog {
  width: min(680px, calc(100vw - 28px)); max-height: min(86vh, 780px); padding: 0;
  border: 1px solid #484043; border-radius: 18px; background: #202125; color: #e8e7e8;
  box-shadow: 0 24px 90px #0009; font-weight: 400;
}
.idea-transfer-dialog::backdrop { background: #09090bcc; backdrop-filter: blur(7px); }
.idea-transfer-dialog form { display: grid; gap: 9px; padding: 20px; overflow: auto; }
.idea-transfer-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid #38373a; }
.idea-transfer-dialog header h2 { margin: 0; color: #eee9e8; font-size: 20px; font-weight: 500; }
.idea-transfer-dialog .eyebrow { margin: 0 0 3px; color: #b66b5f; font-size: 10px; letter-spacing: .14em; }
.idea-transfer-dialog label, .idea-transfer-dialog legend { color: #c8c4c5; font-size: 12px; }
.idea-transfer-dialog input:not([type="checkbox"]), .idea-transfer-dialog textarea, .idea-transfer-dialog select { width: 100%; border: 1px solid #454348; border-radius: 9px; padding: 9px 10px; background: #292a2f; color: #f0eeee; font: inherit; resize: vertical; }
.idea-transfer-dialog fieldset { display: grid; gap: 6px; margin: 2px 0; padding: 9px; border: 1px solid #3d3b40; border-radius: 10px; }
#idea-transfer-context-items { display: grid; gap: 4px; }
.idea-transfer-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: 7px; background: #292a2d; color: #bebcc0; }
.idea-transfer-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-transfer-item input { accent-color: #a64a3a; }
.idea-transfer-item.fixed { display: block; color: #d3b6b0; }
.idea-transfer-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.idea-transfer-dialog button { min-height: 36px; border: 1px solid #514442; border-radius: 9px; padding: 7px 12px; background: #303034; color: #e7e3e2; font: inherit; font-weight: 400; }
.idea-transfer-dialog button[type="submit"] { border-color: #9a4a3e; background: #883f35; }
.chat-message-idea { margin: 8px 0 0; padding: 4px 8px; border: 1px solid #454247; border-radius: 8px; background: transparent; color: #bd928b; font-size: 11px; font-weight: 400; }
.chat-message-idea:hover { border-color: #875046; background: #382a2a; }
.chat-mode .command-panel-slot .idea-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; border-color: #3b393d; background: #242528; color: #e7e5e6; }
.chat-mode .command-panel-slot .idea-main { min-width: 0; }
.chat-mode .command-panel-slot .idea-item h4 { font-weight: 500; }
.chat-mode .command-panel-slot .idea-item p { color: #b9b7bb; }
.chat-mode .command-panel-slot .idea-approval-state, .chat-mode .command-panel-slot .idea-handoff-state { color: #c5877d; font-size: 12px; }
.chat-mode .command-panel-slot .idea-actions, .chat-mode .command-panel-slot .idea-discovery-skills, .chat-mode .command-panel-slot .idea-pm-handoff-form, .chat-mode .command-panel-slot .handoff-prompt { grid-column: 1 / -1; }
.chat-mode .command-panel-slot .idea-actions { align-items: center; }
.chat-mode .command-panel-slot .idea-actions button, .chat-mode .command-panel-slot .idea-actions a { border-color: #4a4243; background: #2a292d; color: #ddd5d5; font-weight: 400; }
.chat-mode .command-panel-slot .idea-approve, .chat-mode .command-panel-slot .idea-pm-handoff-form button[type="submit"] { border-color: #8c493e; background: #783a33; color: #f0e4e2; font-weight: 400; }
.chat-mode .command-panel-slot .idea-skill-entry { border: 1px solid #39383d; border-radius: 9px; padding: 6px 8px; background: #27282b; color: #c7c3c5; }
.chat-mode .command-panel-slot .idea-skill-entry summary { cursor: pointer; color: #c48d84; font-size: 12px; }
.chat-mode .command-panel-slot .idea-skill-form, .chat-mode .command-panel-slot .idea-pm-handoff-form { display: grid; gap: 7px; padding: 10px; border: 1px solid #3a383c; border-radius: 10px; background: #232427; }
.chat-mode .command-panel-slot .idea-skill-form label, .chat-mode .command-panel-slot .idea-pm-handoff-form label { display: grid; gap: 4px; color: #bcb8bb; font-size: 11px; }
.chat-mode .command-panel-slot .idea-skill-form input, .chat-mode .command-panel-slot .idea-skill-form textarea, .chat-mode .command-panel-slot .idea-pm-handoff-form input, .chat-mode .command-panel-slot .idea-pm-handoff-form textarea, .chat-mode .command-panel-slot .idea-pm-handoff-form select { width: 100%; border: 1px solid #454247; border-radius: 8px; padding: 7px 9px; background: #2a292d; color: #e9e5e7; font: inherit; font-weight: 400; }
.chat-mode .command-panel-slot .idea-pm-handoff-form p { margin: 0; color: #c48d84; }
.chat-mode .command-panel-slot .handoff-prompt { max-height: 220px; overflow: auto; border-color: #493c3d; background: #211f22; color: #d7c8c7; font-weight: 400; }
@media (max-width: 600px) { .idea-transfer-dialog form { padding: 14px; } .chat-mode .command-panel-slot .idea-item { grid-template-columns: 1fr; } }

.idea-history-filter { display: grid; grid-template-columns: max-content minmax(180px, 330px); align-items: center; gap: 10px; margin: 14px 0; color: #c6c2c3; font-size: 12px; }
.idea-history-filter select { border: 1px solid #454348; border-radius: 9px; padding: 8px 10px; background: #292a2f; color: #e8e7e8; font: inherit; }
.chat-mode .command-panel-slot .idea-history-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 14px; border-color: #3b393d; border-radius: 12px; background: #232427; color: #e7e5e6; }
.chat-mode .command-panel-slot .idea-history-card .eyebrow { margin: 0 0 5px; color: #a9a4a7; font-size: 10px; letter-spacing: .04em; }
.chat-mode .command-panel-slot .idea-history-card h3 { margin: 0 0 5px; color: #ede9e9; font-size: 16px; font-weight: 400; }
.chat-mode .command-panel-slot .idea-history-card p { margin: 3px 0; color: #bbb7ba; font-size: 12px; line-height: 1.5; }
.chat-mode .command-panel-slot .idea-history-project { color: #be8278; }
.idea-history-conversation { border-top: 1px solid #38373a; padding-top: 7px; color: #c7c2c4; font-size: 12px; }
.idea-history-conversation summary { cursor: pointer; color: #bd8d86; }
.idea-history-transcript { display: grid; gap: 7px; padding-top: 9px; }
.idea-history-message { padding: 8px 10px; border: 1px solid #38373a; border-radius: 9px; background: #1e1f22; }
.idea-history-message span { display: block; margin-bottom: 4px; color: #a9a4a7; font-size: 10px; }
.idea-history-message div { color: #d3d0d1; white-space: normal; }
@media (max-width: 600px) { .idea-history-filter { grid-template-columns: 1fr; gap: 5px; } }
.auth-error { position: relative; margin: 12px 0 0 !important; padding: 10px 12px; border: 1px solid #ff7d7d99; border-radius: 10px; background: #6d252d99; color: #fff !important; font-size: 13px; line-height: 1.45; }

.chat-mode .chat-content-shell { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); flex: 1 1 auto; min-height: 0; gap: 8px; }
.chat-mode .chat-content-shell::before { position: absolute; top: 8px; bottom: 0; left: 40px; width: 1px; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)); content: ''; pointer-events: none; }
.chat-mode .chat-content-shell.history-open, .chat-mode .chat-content-shell.attachments-open { grid-template-columns: 36px minmax(220px, 30%) minmax(0, 1fr); }
.chat-mode .chat-sidebar-tabs { display: flex; align-items: center; flex-direction: column; gap: 6px; padding-top: 8px; }
.chat-mode .chat-sidebar-tabs .chat-sidebar-toggle { display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid #3d3b40; border-radius: 10px; background: #222327; color: #b7aeb3; transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease; }
.chat-mode .chat-sidebar-tabs .chat-sidebar-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.chat-mode .chat-sidebar-tabs .chat-sidebar-toggle:hover, .chat-mode .chat-sidebar-tabs .chat-sidebar-toggle:focus-visible { border-color: #8b5149; outline: 0; background: #2d292b; color: #e5d8d7; transform: translateY(-1px); }
.chat-mode .chat-sidebar-tabs .chat-sidebar-toggle[aria-expanded="true"] { border-color: #71473f; background: #30282a; color: #e4c9c4; }
.chat-mode .chat-ideas-history { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; padding: 12px; border: 1px solid #38363a; border-radius: 13px; background: #1d1e21; color: #e6e3e4; }
.chat-mode .chat-ideas-history[hidden] { display: none; }
.chat-mode .chat-history-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #343337; }
.chat-mode .chat-history-header .eyebrow { margin: 0 0 3px; color: #a19b9e; font-size: 9px; }
.chat-mode .chat-history-header h3 { margin: 0; color: #e4dfe1; font-size: 16px; font-weight: 400; }
.chat-mode .chat-history-header button { width: 28px; height: 28px; padding: 0; border-color: #424044; color: #c8c2c4; }
.chat-mode .chat-new-conversation { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 8px; margin: 10px 0 8px; padding: 9px 10px; border: 1px solid #51403e; border-radius: 9px; background: linear-gradient(135deg, #34292b, #29272b); color: #e3ceca; font-size: 11px; text-align: left; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.chat-mode .chat-new-conversation span { color: #c47c70; font-size: 15px; line-height: 1; }
.chat-mode .chat-new-conversation:hover:not(:disabled), .chat-mode .chat-new-conversation:focus-visible { border-color: #80544c; outline: 0; background: #382e30; transform: translateY(-1px); }
.chat-mode .chat-conversation-history { display: grid; min-height: 0; overflow: auto; align-content: start; gap: 5px; padding: 2px 2px 8px 0; scrollbar-width: none; }
.chat-mode .chat-conversation-history { flex: 1 1 auto; }
.chat-mode .chat-conversation-history::-webkit-scrollbar { display: none; }
.chat-mode .chat-ideas-archive { flex: 0 0 auto; max-height: 42%; min-height: 0; overflow: auto; margin-top: auto; padding-top: 10px; border-top: 1px solid #343337; color: #aaa5a9; font-size: 10px; }
.chat-mode .chat-ideas-archive-trigger { display: flex; min-height: 48px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #3b393e; border-radius: 10px; background: linear-gradient(135deg, #262629, #222327); color: #d6d1d4; cursor: pointer; list-style: none; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.chat-mode .chat-ideas-archive-trigger::-webkit-details-marker { display: none; }
.chat-mode .chat-ideas-archive-trigger:hover, .chat-mode .chat-ideas-archive-trigger:focus-visible { border-color: #584342; outline: 0; background: linear-gradient(135deg, #2d292b, #252428); transform: translateY(-1px); }
.chat-mode .chat-ideas-archive-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 1px solid #4c3d3c; border-radius: 8px; background: #302729; color: #c5897f; }
.chat-mode .chat-ideas-archive-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.chat-mode .chat-ideas-archive-copy { display: grid; min-width: 0; gap: 3px; }
.chat-mode .chat-ideas-archive-copy strong { color: #ddd7da; font-size: 10px; font-weight: 550; }
.chat-mode .chat-ideas-archive-copy small { overflow: hidden; color: #8f8a91; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .chat-ideas-archive-chevron { width: 13px; height: 13px; flex: 0 0 13px; margin-left: auto; fill: none; stroke: #99929a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms ease, stroke 180ms ease; }
.chat-mode .chat-ideas-archive[open] .chat-ideas-archive-chevron { transform: rotate(180deg); stroke: #d2aaa3; }
.chat-mode .chat-ideas-archive-content { padding-top: 9px; }
.chat-mode .chat-ideas-archive .idea-history-filter { margin: 6px 0; }
.chat-mode .chat-ideas-archive .idea-list { max-height: 180px; overflow: auto; }
.chat-mode .chat-history-item { display: grid; width: 100%; min-width: 0; gap: 4px; margin: 0; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #c9c5c9; text-align: left; transition: background 150ms ease, border-color 150ms ease, color 150ms ease; }
.chat-mode .chat-history-item:hover, .chat-mode .chat-history-item:focus-visible { border-color: #38363a; outline: 0; background: #252528; color: #f0edef; }
.chat-mode .chat-history-item[aria-current="true"] { border-color: #59423f; background: #2e282a; color: #eadad7; }
.chat-mode .chat-history-item-title { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .chat-history-item time { color: #858188; font-size: 9px; }
.chat-mode .chat-conversation-history .chat-history-item { display: flex; height: 40px; min-height: 40px; max-height: 40px; align-items: center; justify-content: space-between; gap: 9px; padding: 6px 10px; }
.chat-mode .chat-conversation-history .chat-history-item-title { display: block; min-width: 0; flex: 1 1 auto; overflow: hidden; color: inherit; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .chat-conversation-history .chat-history-item time { flex: 0 0 31px; overflow: hidden; color: #858188; font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: clip; white-space: nowrap; }
.chat-mode .chat-attachments-list { display: grid; min-height: 0; flex: 1 1 auto; align-content: start; gap: 5px; overflow: auto; padding: 8px 2px 4px 0; scrollbar-width: none; }
.chat-mode .chat-attachments-list::-webkit-scrollbar { display: none; }
.chat-mode .chat-attachment-card { display: grid; min-width: 0; gap: 8px; padding: 9px; border: 1px solid #38363c; border-radius: 10px; background: linear-gradient(145deg, #242428, #202125); }
.chat-mode .chat-attachment-heading { display: flex; min-width: 0; align-items: center; gap: 8px; }
.chat-mode .chat-attachment-kind { display: grid; width: 30px; height: 32px; flex: 0 0 30px; place-items: center; border: 1px solid #4c4143; border-radius: 8px; background: #30282a; color: #c68c82; font-size: 7px; font-weight: 700; letter-spacing: .02em; }
.chat-mode .chat-attachment-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: 4px; }
.chat-mode .chat-attachment-name { overflow: hidden; color: #d8d4d7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chat-mode .chat-attachment-meta { color: #89858d; font-size: 9px; line-height: 1.35; }
.chat-mode .chat-attachment-preview { min-width: 0; overflow: hidden; border: 1px solid #343338; border-radius: 8px; background: #191a1e; }
.chat-mode .chat-attachment-audio-preview { display: block; width: 100%; min-width: 0; height: 34px; }
.chat-mode .chat-attachment-image-preview { display: grid; min-height: 72px; place-items: center; }
.chat-mode .chat-attachment-image-preview img { display: block; width: 100%; max-height: 170px; object-fit: contain; }
.chat-mode .chat-attachment-document-preview { display: block; width: 100%; height: 170px; border: 0; background: #f2f1ef; }
.chat-mode .chat-attachment-open, .chat-mode .chat-attachment-jump { justify-self: start; margin: 0; padding: 4px 7px; border: 1px solid #403e44; border-radius: 7px; background: #28292e; color: #bfb5d8; font-size: 9px; text-decoration: none; }
.chat-mode .chat-attachment-open:hover, .chat-mode .chat-attachment-jump:hover { border-color: #675b75; background: #302d36; }
.chat-mode .chat-attachment-expired { margin: 0; color: #a39da4; font-size: 10px; }
.chat-mode .chat-attachments-empty { margin: 8px 2px; color: #99959d; font-size: 11px; line-height: 1.5; }
.chat-mode .attachment-chip.chat-attachment-focused { animation: chat-attachment-target 900ms ease-out both; }
@keyframes chat-attachment-target { 0%, 100% { box-shadow: 0 0 0 0 #c7786c00; } 22% { box-shadow: 0 0 0 2px #c7786c88, 0 0 24px #c7786c55; } }
.chat-mode .idea-history-filter { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 8px 0; color: #a8a4a7; font-size: 10px; }
.chat-mode .idea-history-filter select { width: 100%; padding: 7px 8px; font-size: 11px; }
.chat-mode .chat-ideas-history .idea-list { min-height: 0; overflow: auto; align-content: start; gap: 7px; scrollbar-color: #4b494e transparent; }
.chat-mode .chat-ideas-history .idea-history-card { display: block; padding: 9px; border-color: #363438; border-radius: 10px; background: #242427; }
.chat-mode .chat-ideas-history .idea-history-card .eyebrow { margin: 0 0 4px; color: #99959a; font-size: 9px; letter-spacing: 0; }
.chat-mode .chat-ideas-history .idea-history-card h3 { display: -webkit-box; overflow: hidden; margin: 0 0 4px; color: #e5e1e2; font-size: 12px; font-weight: 400; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.chat-mode .chat-ideas-history .idea-history-card p { display: -webkit-box; overflow: hidden; margin: 3px 0; color: #aaa6aa; font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.chat-mode .chat-ideas-history .idea-history-card .idea-history-project { color: #bb837a; }
.chat-mode .chat-ideas-history .idea-history-conversation { margin-top: 6px; padding-top: 6px; font-size: 10px; }
.chat-mode .chat-ideas-history .idea-history-transcript { gap: 5px; }
.chat-mode .chat-ideas-history .idea-history-message { padding: 6px 7px; font-size: 10px; }
.chat-mode .chat-main-column { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.chat-mode .chat-main-column .chat-transcript { flex: 1 1 auto; }
.chat-mode .chat-main-column .chat-composer { position: relative; z-index: 2; border-top-color: transparent; background: linear-gradient(180deg, rgba(32, 33, 37, .84), #202125 30px); }
.chat-mode .chat-main-column .chat-transcript { position: relative; z-index: 1; }
.chat-mode .chat-main-column .chat-transcript::before, .chat-mode .chat-main-column .chat-transcript::after { position: absolute; z-index: 3; right: 0; left: 0; display: block; content: ''; pointer-events: none; }
.chat-mode .chat-main-column .chat-transcript::before { top: 0; height: 38px; background: linear-gradient(180deg, rgba(24, 25, 27, .96), rgba(24, 25, 27, 0)); }
.chat-mode .chat-main-column .chat-transcript::after { bottom: -12px; height: 58px; background: linear-gradient(180deg, rgba(24, 25, 27, 0), rgba(24, 25, 27, .72) 55%, rgba(32, 33, 37, .92)); }
@media (max-width: 700px) {
  .chat-mode .chat-content-shell.history-open, .chat-mode .chat-content-shell.attachments-open { grid-template-columns: 36px minmax(0, 1fr); }
  .chat-mode .chat-ideas-history { position: absolute; z-index: 25; top: 0; bottom: 0; left: 44px; width: min(320px, calc(100% - 50px)); box-shadow: 0 14px 36px #0009; }
}
@media (prefers-reduced-motion: reduce) { .chat-mode #map-window, .chat-mode #map-window.chat-closing { animation-duration: 1ms; }.chat-mode #map-window-close, .chat-mode .chat-new-conversation, .chat-mode .chat-history-item { transition-duration: 1ms; } }

.chat-mode .command-panel-slot > #analysis-window,
.chat-mode .command-panel-slot > #activity-window { padding: 12px 14px; }
.chat-mode .command-panel-slot > #analysis-window .panel-title,
.chat-mode .command-panel-slot > #activity-window .panel-title { margin-bottom: 10px; }
.analysis-live-summary { display: grid; gap: 7px; }
.analysis-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.analysis-metrics > div { display: grid; min-width: 0; gap: 4px; padding: 9px 10px; border: 1px solid #3a383d; border-radius: 10px; background: #242427; }
.analysis-metrics span { color: #aaa5a8; font-size: 10px; }
.analysis-metrics strong { color: #e8e3e5; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.analysis-updated { margin: 0; color: #8e8b90; font-size: 10px; }
.chat-mode .analysis-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.chat-mode .analysis-actions > button { margin: 0; padding: 7px 11px; font-size: 11px; }
.chat-mode #analysis-result { flex: 1 1 300px; margin: 0; padding: 8px 10px; border-color: #443b3d; background: #242224; }
.analysis-report-heading { color: #c58b82; }
.audit-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.audit-filters label { display: grid; gap: 4px; min-width: 0; color: #a9a5a8; font-size: 10px; }
.audit-filters select { width: 100%; min-width: 0; padding: 7px 9px; font-size: 11px; }
.chat-mode .event-feed { max-height: min(38vh, 350px); gap: 6px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.chat-mode .event-feed::-webkit-scrollbar { display: none; }
.chat-mode .event.audit-event { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 10px 12px; border: 1px solid #363438; border-radius: 10px; background: #232326; font-size: 11px; }
.audit-event-meta { display: flex; align-items: center; gap: 7px; color: #aaa5a8; font-size: 10px; }
.audit-event-meta time { margin-left: auto; color: #858187; white-space: nowrap; }
.audit-kind { padding: 2px 6px; border: 1px solid #494247; border-radius: 99px; color: #c38a80; }
.audit-kind-ticket { color: #d3a778; border-color: #594839; }
.audit-kind-other { color: #9b9ba5; border-color: #414147; }
.audit-event-title { margin: 0; color: #e3dfe1; font-size: 12px; overflow-wrap: anywhere; }
.audit-event details { color: #9d999d; font-size: 10px; }
.audit-event details summary { cursor: pointer; width: fit-content; color: #bb8178; }
.audit-event details p { margin: 4px 0 0; max-height: 100px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filters { grid-template-columns: 1fr; gap: 6px; }
}
.chat-mode .command-panel-slot > #tickets-window { margin: 0 0 16px; }
.chat-mode .command-panel-slot > #tickets-window > .panel { padding-bottom: 28px; }
.chat-mode .ticket-list { padding-bottom: 10px; scroll-padding-bottom: 10px; }
.idea-audit-card { display: grid; gap: 9px; padding: 11px 12px; border: 1px solid #473b3e; border-radius: 11px; background: linear-gradient(135deg, #2c2528, #242427 72%); }
.idea-audit-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: #c68d83; font-size: 10px; }
.idea-audit-status span:first-child { padding: 3px 7px; border: 1px solid #624742; border-radius: 99px; background: #382a2b; }
.idea-audit-description { margin: 0; color: #c8c2c5; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.idea-audit-context { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #e0d9dc; font-size: 10px; }
.idea-audit-context span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.idea-audit-context small { color: #928b90; font-size: 9px; }
.select-shell { position: relative; display: block; width: 100%; min-width: 0; }
.select-shell > select { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; overflow: hidden; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.select-trigger { display: flex; width: 100%; min-width: 0; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 12px; border: 1px solid #414247; border-radius: 10px; background: linear-gradient(180deg, #2b2c31, #25262a); color: #e3e2e6; box-shadow: inset 0 1px #ffffff08; font: inherit; font-size: 13px; font-weight: 400; text-align: left; cursor: pointer; }
.select-trigger:hover:not(:disabled) { border-color: #5a5359; background: #303035; }
.select-trigger:focus-visible { outline: 2px solid #a8665e; outline-offset: 2px; }
.select-trigger:disabled { opacity: .55; cursor: not-allowed; }
.select-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger-arrow { flex: 0 0 7px; width: 7px; height: 7px; border-right: 1.5px solid #a7a3a8; border-bottom: 1.5px solid #a7a3a8; transform: translateY(-2px) rotate(45deg); }
.select-menu { position: fixed; z-index: 1000; display: grid; box-sizing: border-box; gap: 2px; overflow-x: hidden; overflow-y: auto; padding: 5px; border: 1px solid #47464c; border-radius: 12px; background: #222327f5; box-shadow: 0 16px 42px #000a, inset 0 1px #ffffff0a; color: #e8e6e8; backdrop-filter: blur(16px); scrollbar-width: thin; scrollbar-color: #57545a transparent; }
.select-option { display: flex; width: 100%; min-width: 0; min-height: 35px; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #d6d4d8; font: inherit; font-size: 12px; font-weight: 400; text-align: left; cursor: pointer; }
.select-option:hover:not(:disabled), .select-option:focus-visible { border-color: #494044; outline: 0; background: #343035; color: #fff; }
.select-option[aria-selected="true"] { background: #382d30; color: #e4b0a6; }
.select-option:disabled { opacity: .45; cursor: not-allowed; }
.select-option > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-option-mark { flex: 0 0 14px; color: #c6857b; text-align: center; }
.chat-mode .chat-model-choice .select-shell { flex: 0 1 auto; width: auto; max-width: min(340px, 34vw); }
.chat-mode .chat-model-choice .select-trigger { width: auto; max-width: 100%; min-height: 22px; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: #b6b5bb; box-shadow: none; font-size: 10px; }
.chat-mode .chat-model-choice .select-trigger:hover:not(:disabled), .chat-mode .chat-model-choice .select-trigger:focus-visible { border: 0; outline: 0; background: transparent; color: #e4d5d3; text-decoration: underline; text-decoration-color: #a8665e; text-underline-offset: 3px; }
.chat-mode .chat-model-choice .select-trigger-arrow { display: none; }
.chat-mode .chat-model-choice .select-menu { font-size: 11px; }
.chat-mode .chat-model-choice .chat-model-select-menu { border-color: #3d3b40; border-radius: 9px; background: #202125f7; box-shadow: 0 10px 28px #0008, inset 0 1px #ffffff08; }
.chat-mode .chat-model-choice .select-option { min-height: 31px; font-size: 11px; }
.chat-mode .chat-model-choice .chat-model-select-menu .select-option { min-height: 28px; padding: 5px 8px; font-size: 10px; }
.chat-mode .command-panel-slot .select-trigger { border-color: #514442; background: #29272a; color: #eee8e6; }
.chat-mode .command-panel-slot .select-trigger:hover:not(:disabled) { border-color: #705953; background: #332d30; }
.chat-mode .command-panel-slot .select-menu { border-color: #514442; }
.chat-mode #map-window { z-index: 60; pointer-events: auto; }
.chat-mode #operator-chat-window,
.chat-mode #command-chat-pane,
.chat-mode #command-panel-slot,
.chat-mode .command-tabs,
.chat-mode .command-panel-slot > * { pointer-events: auto; }
.chat-mode .chat-compose-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin: 3px 4px 0; }
.chat-mode .chat-model-choice { flex: 1 1 auto; min-width: 0; width: auto; max-width: 60%; margin: 0; gap: 6px; }
.chat-mode .chat-model-choice label { flex: 0 0 auto; color: #85868e; font-size: 10px; }
.chat-mode .chat-model-choice select { width: auto; min-width: 0; max-width: min(340px, 34vw); min-height: 22px; overflow: hidden; padding: 2px 0; border: 0; border-radius: 0; appearance: none; background: transparent; background-image: none; color: #b6b5bb; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.chat-mode .chat-model-choice select:hover:not(:disabled) { color: #e4d5d3; }
.chat-mode .chat-model-choice select:focus-visible { outline: 0; color: #e4d5d3; text-decoration: underline; text-decoration-color: #a8665e; text-underline-offset: 3px; }
.chat-mode .chat-model-choice select option { background: #25262a; color: #e6e4e7; }
.chat-mode .chat-compose-hint { flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; }
.chat-mode #chat-recording-status:empty { display: none; }
.chat-mode .chat-compose-input-shell { position: relative; isolation: isolate; display: grid; flex: 1 1 auto; grid-template-rows: auto auto; min-width: 0; border: 1px solid transparent; border-radius: 12px; background: linear-gradient(145deg, #242529, #222328) padding-box, linear-gradient(120deg, #ffffff0a, #ffffff02 52%, #ffffff07) border-box; box-shadow: 0 5px 18px #00000012; transition: background .24s ease, box-shadow .28s ease; }
.chat-mode .chat-compose-input-shell::after { position: absolute; right: 13%; bottom: 0; left: 13%; z-index: 2; height: 1px; border-radius: 1px; background: linear-gradient(90deg, transparent, #bc776c65 25%, #d59c91 50%, #bc776c65 75%, transparent); content: ''; opacity: .42; pointer-events: none; transform: scaleX(.58); transform-origin: center; transition: opacity .28s ease, transform .38s cubic-bezier(.2, .7, .2, 1); }
.chat-mode .chat-compose-input-shell:focus-within { background: linear-gradient(145deg, #252529, #232429) padding-box, linear-gradient(120deg, #ffffff0c, #ffffff03 52%, #ffffff09) border-box; box-shadow: 0 7px 20px #00000018, 0 8px 18px -20px #d58d80b3; }
.chat-mode .chat-compose-input-shell:focus-within::after { opacity: .95; transform: scaleX(1); animation: chat-compose-focus-arrive 480ms cubic-bezier(.2, .75, .2, 1) both; }
@keyframes chat-compose-focus-arrive { from { opacity: 0; transform: scaleX(.18); filter: blur(.5px); } to { opacity: .95; transform: scaleX(1); filter: blur(0); } }
.chat-mode .chat-compose-input-shell textarea { width: 100%; flex: none; min-height: 38px; padding: 7px 10px; background: transparent; }
.chat-mode .chat-compose-input-shell textarea:focus-visible { box-shadow: none; background: transparent; }
.chat-mode .chat-draft-audio:not(:empty) { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 0; }
.chat-mode .chat-draft-audio .attachment-audio-chip { display: inline-flex; width: fit-content; max-width: 100%; min-width: 0; min-height: 34px; gap: 5px; padding: 1px 5px; border-color: transparent; background: #2b2b30; }
.chat-mode .chat-draft-audio .attachment-audio-chip audio { width: min(230px, 55vw); min-width: min(150px, 40vw); height: 30px; }
.chat-mode .chat-draft-audio .attachment-audio-chip > .visually-hidden { flex: 0 0 0; }
.chat-mode .chat-live-recording { display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 5px 8px 2px; padding: 0 11px; border: 1px solid #8f514b55; border-radius: 10px; background: linear-gradient(100deg, #352829, #2a292d 58%, #302729); color: #e4d6d4; }
.chat-mode .chat-live-recording[hidden] { display: none; }
.chat-mode .chat-live-recording-dot { position: relative; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #d87870; box-shadow: 0 0 9px #d8787080; }
.chat-mode .chat-live-recording-dot::after { position: absolute; inset: -4px; border: 1px solid #d8787070; border-radius: inherit; content: ''; animation: chat-recording-pulse 1.7s ease-out infinite; }
.chat-mode .chat-live-recording-time { flex: 0 0 auto; min-width: 29px; color: #d4b6b2; font-size: 11px; font-variant-numeric: tabular-nums; }
.chat-mode .chat-live-recording-wave { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 3px; height: 26px; min-width: 0; overflow: hidden; }
.chat-mode .chat-live-recording-wave i { display: block; flex: 1 1 2px; min-width: 2px; max-width: 4px; height: 4px; border-radius: 3px; background: linear-gradient(180deg, #e29a8e, #b96863); opacity: .88; transition: height 90ms linear; }
@keyframes chat-recording-pulse { 0% { transform: scale(.65); opacity: .8; } 100% { transform: scale(1.65); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-mode .chat-live-recording-dot::after, .chat-mode .chat-compose-input-shell:focus-within::after { animation: none; }.chat-mode .chat-compose-input-shell, .chat-mode .chat-compose-input-shell::after { transition-duration: 1ms; } }
@media (max-width: 600px) {
  .chat-mode .chat-compose-meta { gap: 5px; margin-inline: 2px; }
  .chat-mode .chat-model-choice { max-width: 52%; gap: 4px; }
  .chat-mode .chat-model-choice select { max-width: 31vw; }
  .chat-mode .chat-quota { grid-template-columns: max-content 38px; gap: 4px; font-size: 9px; }
  .chat-mode .chat-compose-hint { display: flex; }
  .chat-mode .chat-compose-input-shell { border-radius: 10px; }
  .chat-mode .chat-compose-input-shell textarea { min-height: 36px; padding: 6px 7px; font-size: 14px; }
  .chat-mode .chat-draft-audio:not(:empty) { padding: 4px 5px 0; }
  .chat-mode .chat-draft-audio .attachment-audio-chip { width: fit-content; max-width: 100%; gap: 4px; padding: 1px 3px; }
  .chat-mode .chat-draft-audio .attachment-audio-chip audio { width: min(190px, 55vw); min-width: min(132px, 39vw); }
}

/* Close affordances share one geometry so the × stays centered in a true circle. */
.icon-close-button { display: inline-grid !important; flex: 0 0 34px !important; place-items: center; box-sizing: border-box; width: 34px !important; min-width: 34px !important; max-width: 34px !important; height: 34px !important; min-height: 34px !important; max-height: 34px !important; aspect-ratio: 1 / 1; flex-shrink: 0 !important; margin: 0; padding: 0 !important; border: 1px solid #55545c !important; border-radius: 50% !important; background: #292a2f; color: #d0cdd2; font-size: 0 !important; line-height: 0 !important; text-align: center; }
.icon-close-button:hover, .icon-close-button:focus-visible { border-color: #8b7777 !important; background: #393438; color: #f0dedb; }
.icon-close-glyph { display: block; width: 12px; height: 12px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.chat-mode .attachment-chip > .icon-close-button, .chat-mode .github-reference-chip > .icon-close-button { flex: 0 0 22px !important; width: 22px !important; min-width: 22px !important; max-width: 22px !important; height: 22px !important; min-height: 22px !important; max-height: 22px !important; }
.chat-mode .attachment-chip > .icon-close-button .icon-close-glyph, .chat-mode .github-reference-chip > .icon-close-button .icon-close-glyph { width: 10px; height: 10px; }
.chat-mode .attachment-audio-chip audio { flex: 0 0 auto; width: min(190px, 52vw); min-width: min(150px, 42vw); max-width: 100%; height: 32px; }
.chat-mode .chat-draft-audio .attachment-audio-chip audio { width: min(230px, 55vw); min-width: min(150px, 40vw); }
@media (max-width: 600px) { .chat-mode .attachment-audio-chip audio { width: min(170px, 48vw); min-width: min(132px, 39vw); } .chat-mode .chat-draft-audio .attachment-audio-chip audio { width: min(190px, 55vw); min-width: min(132px, 39vw); } }

/* Premium agent details: a compact, shared surface for the map and chat. */
#agent-detail.map-popup,
#agent-chat-detail:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  width: auto;
  max-width: none;
  max-height: none;
  place-items: center;
  overflow: hidden;
  padding: clamp(12px, 3vw, 32px);
  border: 0;
  border-radius: 0;
  background: rgb(8 10 14 / 72%);
  box-shadow: none;
  color: #ececf1;
  backdrop-filter: blur(12px) saturate(.8);
}
#agent-detail.map-popup.hidden,
#agent-chat-detail.hidden { display: none !important; }
.agent-detail-panel {
  position: relative;
  width: min(100%, 1040px);
  max-height: min(900px, calc(100vh - 32px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #ffffff20;
  border-radius: 24px;
  background: linear-gradient(145deg, #25262bfa, #191a1ef8 72%);
  box-shadow: 0 35px 100px #0009, inset 0 1px #ffffff12;
}
.agent-detail-panel::-webkit-scrollbar { display: none; }
.agent-detail-panel > .popup-close { position: absolute; top: 18px; right: 18px; float: none; z-index: 1; }
.agent-detail-header { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 2px 48px 22px 0; border-bottom: 1px solid #ffffff12; }
.agent-detail-header .agent-avatar { display: grid; width: 58px; height: 58px; margin: 0; place-items: center; border: 1px solid #ffffff26; border-radius: 18px; color: #fff; font-size: 23px; font-weight: 700; box-shadow: 0 12px 28px color-mix(in srgb, var(--agent) 32%, transparent), inset 0 1px #ffffff45; }
.agent-detail-heading { min-width: 0; }
.agent-detail-heading .eyebrow, .agent-detail-section-heading .eyebrow { margin: 0 0 5px; color: #aaa8b2; font-size: 10px; letter-spacing: .15em; }
.agent-detail-heading h2 { margin: 0; color: #f7f6f8; font-size: clamp(24px, 3vw, 34px); font-weight: 550; letter-spacing: -.045em; }
.agent-detail-heading .agent-role { margin: 5px 0 0; color: #aaa9b1; font-size: 12px; font-weight: 400; }
.agent-detail-header .agent-status { margin: 0; padding: 7px 11px; border: 1px solid #ffffff13; background: #ffffff0a; color: #c9c6cf; font-size: 11px; font-weight: 550; }
.agent-capability { max-width: 780px; margin: 18px 0 22px; color: #d1cfd6; font-size: 14px; line-height: 1.6; }
.agent-detail-grid { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: start; gap: 14px; }
.agent-detail-operations, .agent-detail-settings { min-width: 0; padding: 17px; border: 1px solid #ffffff12; border-radius: 16px; background: #ffffff06; }
.agent-detail-operations:empty { display: none; }
.agent-detail-grid:has(.agent-detail-operations:empty) { grid-template-columns: minmax(0, 1fr); }
.agent-detail-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.agent-detail-section-heading h3 { margin: 0; color: #efedf1; font-size: 16px; font-weight: 550; letter-spacing: -.02em; }
.agent-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px 12px; }
.agent-detail-panel label { display: grid; gap: 5px; min-width: 0; margin: 0; color: #bcb9c2; font-size: 11px; font-weight: 500; }
.agent-detail-panel input:not([type="checkbox"]), .agent-detail-panel select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #ffffff19; border-radius: 10px; background: #17181c; color: #efedf1; font-size: 12px; font-weight: 400; }
.agent-detail-panel button:not(.popup-close) { min-height: 36px; margin: 0; padding: 7px 11px; border: 1px solid #ffffff19; border-radius: 10px; background: #554a78; color: #f5f2ff; font-size: 12px; font-weight: 550; }
.agent-detail-panel button.ghost { background: #ffffff08; color: #d3d0d8; }
.agent-detail-panel .agent-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.agent-policy-note { margin: 12px 0 0; color: #97959f; font-size: 10px; line-height: 1.5; }
.agent-detail-operations > label { margin: 10px 0; }
.agent-detail-operations > button { margin: 7px 7px 0 0 !important; }
.agent-detail-operations .report-result, .agent-detail-operations .handoff-prompt { border-color: #ffffff14; background: #17181c; color: #d5d2d9; }

/* RRSS editorial workflow: live KPIs, unbounded queue, monthly calendar and account state. */
.work-view { display: grid; gap: 14px; margin-top: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric-card { display: grid; gap: 7px; min-width: 0; padding: 14px 16px; border: 1px solid #ffffff12; border-radius: 13px; background: linear-gradient(140deg, #ffffff08, #ffffff03); }
.metric-card span { color: #a8a7af; font-size: 11px; }
.metric-card strong { color: #f2f0f3; font-size: 22px; font-weight: 560; letter-spacing: -.04em; }
.chat-mode .command-panel-slot > #social-window { display: block; margin: 0; }
.chat-mode .command-panel-slot > #social-window > #rrss { margin: 0; }
#rrss #calendar-window { display: block; margin: 24px 0 0; padding: 22px 0 0; border: 0; border-top: 1px solid #ffffff12; border-radius: 0; background: transparent; box-shadow: none; }
.social-kpis { margin: 16px 0 24px; }
.social-queue-section, .social-connections-section { min-width: 0; margin-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h3 { margin: 0; color: #f0eef2; font-size: 18px; font-weight: 560; letter-spacing: -.025em; }
.section-heading .eyebrow { margin-bottom: 4px; }
.social-queue { max-height: none; overflow: visible; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.social-item { grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr); align-items: start; gap: 18px; padding: 17px; border-color: #ffffff12; border-radius: 15px; background: linear-gradient(145deg, #ffffff07, #ffffff03); }
.social-item-copy { min-width: 0; }
.social-item-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.social-platform-mark { display: inline-grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border: 1px solid #ffffff17; border-radius: 8px; color: #eee; font-size: 13px; font-weight: 750; line-height: 1; }
.social-platform-mark.instagram { color: #eab6c4; background: #e1306c15; }
.social-platform-mark.linkedin { color: #9dcaf4; background: #0a66c215; font-size: 10px; }
.social-platform-name { color: #aeacb5; font-size: 11px; }
.social-item h4 { color: #f3f1f4; font-size: 16px; font-weight: 570; }
.social-item .social-caption { margin: 7px 0 0; color: #c0bec7; font-size: 13px; white-space: pre-wrap; }
.social-item-actions { display: grid; align-content: start; justify-items: stretch; gap: 9px; min-width: 0; }
.social-item-actions > button, .social-resource-form button { min-height: 36px; margin: 0; padding: 8px 11px; border: 1px solid #ffffff17; border-radius: 9px; font-size: 11px; }
.social-resource-form { display: grid; gap: 9px; min-width: 0; padding: 11px; border: 1px solid #ffffff12; border-radius: 11px; background: #ffffff04; }
.social-resource-form label { margin: 0; color: #aaa8b1; font-size: 10px; font-weight: 500; }
.social-resource-form input { width: 100%; min-height: 34px; padding: 7px 9px; font-size: 11px; }
.social-resource-form button { background: #34313e; color: #e5ddff; }
.social-script { margin-top: 10px; color: #b4b1bb; font-size: 11px; }
.social-script summary, .social-scopes summary { width: fit-content; cursor: pointer; }
.social-script p, .social-scopes p { margin: 7px 0 0; white-space: pre-wrap; }
.social-validation { display: inline-block; margin-top: 9px; color: #8cc8a5; font-size: 10px; }
.social-validation.error { color: #e5a2a0; }
.social-calendar-section > .muted { margin: 0 0 12px; }
.social-calendar-toolbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; max-width: 540px; margin: 12px auto; text-align: center; }
.social-calendar-toolbar strong { color: #eeeaf1; font-size: 14px; font-weight: 580; text-transform: capitalize; }
.social-calendar-toolbar button { width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; }
.social-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekday { padding: 6px 0; color: #8e8c95; font-size: 10px; font-weight: 700; text-align: center; }
.calendar-day { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 78px; margin: 0; padding: 6px; overflow: hidden; border: 1px solid #ffffff0d; border-radius: 9px; background: #ffffff03; color: #d7d5dd; text-align: left; }
.calendar-day:hover { border-color: #ffffff24; background: #ffffff08; }
.calendar-day.outside { opacity: .38; }
.calendar-day.today { border-color: #967fcb80; background: #927cc314; }
.calendar-day-number { margin-bottom: 4px; color: #bdbbc4; font-size: 10px; }
.calendar-day-entry { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 2px 0; padding: 3px 4px; overflow: hidden; border-radius: 5px; background: #8f7aca19; color: #ded9e7; font-size: 9px; white-space: nowrap; }
.calendar-day-entry .social-platform-mark { flex-basis: 15px; width: 15px; height: 15px; border: 0; border-radius: 4px; font-size: 10px; }
.calendar-day-entry .social-platform-mark.linkedin { font-size: 8px; }
.calendar-day-entry.planned { background: #9a84521c; }
.calendar-day-entry.publishing { background: #c891251e; }
.calendar-day-entry.failed { background: #b544441e; color: #ebb4b4; }
.calendar-day-entry.published { background: #42876220; }
.calendar-day-more { color: #a7a3b0; font-size: 9px; }
.social-calendar-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr) auto; align-items: end; gap: 10px; margin-top: 15px; padding: 13px; border: 1px solid #ffffff10; border-radius: 12px; background: #ffffff03; }
.social-calendar-form label { margin: 0; color: #aaa8b1; font-size: 10px; font-weight: 500; }
.social-calendar-form button { min-height: 38px; margin: 0; padding: 8px 11px; background: #51466e; font-size: 11px; }
.social-connections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-connection-card { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 15px; border: 1px solid #ffffff12; border-radius: 13px; background: #ffffff04; }
.social-connection-card.connected { border-color: #6eb68c35; }
.social-connection-top { display: flex; align-items: center; gap: 10px; }
.social-connection-top .social-platform-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; font-size: 16px; }
.social-connection-top .social-platform-mark.linkedin { font-size: 12px; }
.social-connection-top h4 { margin: 0 0 4px; color: #efedf1; font-size: 14px; }
.social-connection-status { display: flex; align-items: center; gap: 6px; margin: 0; color: #aaa8b1; font-size: 10px; }
.connection-led { width: 7px; height: 7px; border-radius: 50%; background: #5a5960; }
.connection-led.on { background: #69bd8e; box-shadow: 0 0 8px #69bd8e70; }
.connection-led.warn { background: #d3a45b; }
.social-connection-account { margin: 0; color: #ddd9e2; font-size: 12px; }
.social-connection-setup { margin: 0; color: #c9a987; font-size: 10px; line-height: 1.45; }
.social-connection-actions { display: flex; justify-content: flex-end; }
.social-connection-actions button { min-height: 32px; margin: 0; padding: 6px 10px; font-size: 10px; }
.social-connection-actions .social-connect { background: #40384e; color: #e4d8ff; }
.social-connection-actions button:disabled { opacity: .5; cursor: not-allowed; }
.social-scopes { color: #9e9ca5; font-size: 10px; }
.social-test-history { margin-top: 20px; }
.social-test-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.social-test-run { display: grid; gap: 6px; padding: 12px; border: 1px solid #ffffff10; border-radius: 11px; background: #ffffff03; }
.social-test-run > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #e7e5eb; font-size: 11px; }
.social-test-run small { color: #93919a; font-size: 9px; }
.social-test-run p { margin: 0; color: #b7b4bd; font-size: 10px; }
.test-result { color: #e8bd80; font-size: 10px; }
.test-result.completed { color: #8bc9a0; }
.test-result.failed { color: #e39a99; }
@media (max-width: 760px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-item { grid-template-columns: minmax(0, 1fr); }
  .social-item-actions { grid-template-columns: minmax(0, 1fr); }
  .social-calendar-form { grid-template-columns: minmax(0, 1fr); }
  .social-connections { grid-template-columns: minmax(0, 1fr); }
  .calendar-day { min-height: 65px; padding: 4px; }
  .calendar-day-entry { padding: 2px; font-size: 8px; }
  #rrss #calendar-window { padding-top: 17px; }
}
@media (max-width: 420px) {
  .metric-card { padding: 11px; }
  .metric-card strong { font-size: 19px; }
  .social-calendar-grid { gap: 3px; }
  .calendar-day { min-height: 56px; }
  .calendar-day-entry { justify-content: center; }
  .calendar-day-entry:not(:has(.social-platform-mark)) { display: none; }
  .calendar-day-entry .social-platform-mark { flex: 0 0 15px; }
}
@media (max-width: 760px) {
  #agent-detail.map-popup, #agent-chat-detail:not(.hidden) { padding: 8px; }
  .agent-detail-panel { max-height: calc(100vh - 16px); padding: 18px; border-radius: 18px; }
  .agent-detail-header { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; padding: 0 42px 15px 0; }
  .agent-detail-header .agent-avatar { width: 46px; height: 46px; border-radius: 15px; font-size: 19px; }
  .agent-detail-header .agent-status { grid-column: 2; justify-self: start; }
  .agent-detail-panel > .popup-close { top: 12px; right: 12px; }
  .agent-detail-grid, .agent-config-grid { grid-template-columns: minmax(0, 1fr); }
}

.approvals-panel > .muted { max-width: 900px; line-height: 1.55; }
.approval-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.approval-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.approval-filters input, .approval-filters select { min-width: 0; min-height: 38px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff06; color: var(--ink); font: inherit; font-size: 12px; }
.approval-table-wrap { width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #ffffff03; }
.approval-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.approval-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.approval-table td { padding: 12px; border-bottom: 1px solid #ffffff0c; color: #e3e0e7; font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.approval-table tbody tr:last-child td { border-bottom: 0; }
.approval-table th:first-child { width: 30%; }
.approval-table th:nth-child(2) { width: 14%; }
.approval-table th:nth-child(3) { width: 12%; }
.approval-table th:nth-child(4) { width: 18%; }
.approval-table th:nth-child(5) { width: 11%; }
.approval-table th:last-child { width: 15%; }
.approval-table td:first-child strong { display: block; color: #f2eff4; font-size: 12px; font-weight: 600; }
.approval-table td:first-child small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.approval-review-list { display: flex; flex-wrap: wrap; gap: 5px; }
.approval-review-state, .approval-status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; min-height: 22px; padding: 3px 7px; border: 1px solid #ffffff12; border-radius: 999px; background: #ffffff06; color: #c4c1ca; font-size: 9px; line-height: 1.2; }
.approval-review-state.approved, .approval-status.approved { border-color: #75bd9030; background: #4e906116; color: #a4d8b4; }
.approval-review-state.pending, .approval-status.pending { border-color: #ddb87330; background: #bf8f3416; color: #e2c28a; }
.approval-review-state.blocked, .approval-status.blocked { border-color: #d4777730; background: #a94b4b16; color: #e7a0a0; }
.approval-review-state.cancelled { color: #9c99a2; }
.approval-waiting { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.approval-actions button { min-height: 29px; margin: 0; padding: 5px 8px; border-radius: 8px; font-size: 9px; white-space: nowrap; }
.approval-actions .ghost { border-color: #ffffff16; background: #ffffff05; color: #d5c9e9; }
.approval-empty { height: 75px; color: var(--muted) !important; text-align: center; }
@media (max-width: 760px) {
  .approval-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .approval-table, .approval-table tbody { display: block; width: 100%; }
  .approval-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; padding: 8px 10px; border-bottom: 1px solid #ffffff0c; }
  .approval-table tbody tr:last-child { border-bottom: 0; }
  .approval-table td, .approval-table tbody tr:last-child td { display: block; min-width: 0; padding: 8px 2px; border: 0; }
  .approval-table td::before { display: block; margin-bottom: 5px; color: var(--muted); content: attr(data-label); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
  .approval-table td:first-child { grid-column: 1 / -1; }
  .approval-table td:last-child { grid-column: 1 / -1; }
  .approval-table td[colspan] { grid-column: 1 / -1; text-align: center; }
}

/* Shared loading and motion language for the command center. */
.skeleton { position: relative; display: block; overflow: hidden; border: 1px solid #ffffff08; border-radius: 10px; background: linear-gradient(105deg, #24252a 24%, #2c2d33 38%, #24252a 54%); background-size: 220% 100%; animation: skeleton-shimmer 1.45s ease-in-out infinite; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #ffffff0c, transparent); transform: translateX(-100%); animation: skeleton-sweep 1.8s ease-in-out infinite; }
.skeleton-stat { width: 92px; height: 48px; }
.skeleton-stack { display: grid; gap: 9px; }
.skeleton-card { width: 100%; min-height: 78px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.skeleton-metric { min-height: 60px; }
.skeleton-calendar-day { min-height: 70px; }
@keyframes skeleton-shimmer { to { background-position-x: -220%; } }
@keyframes skeleton-sweep { to { transform: translateX(100%); } }
.command-panel-slot.is-transitioning, .command-chat-pane.is-transitioning { animation: command-tab-arrive .24s cubic-bezier(.2,.75,.25,1) both; }
@keyframes command-tab-arrive { from { opacity: .35; transform: translateY(7px); filter: blur(2px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
body:not(.chat-mode) #map-window[open]:not(.chat-closing) { animation: command-dialog-arrive .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes command-dialog-arrive { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
#agent-detail:not(.hidden), #agent-chat-detail:not(.hidden) { animation: overlay-arrive .2s ease both; }
#agent-detail.panel-closing, #agent-chat-detail.panel-closing { animation: overlay-dismiss .16s ease both; pointer-events: none; }
#agent-detail:not(.hidden) .agent-detail-panel, #agent-chat-detail:not(.hidden) .agent-detail-panel { animation: command-dialog-arrive .24s cubic-bezier(.2,.8,.2,1) both; }
.chat-mode .chat-ideas-history:not([hidden]) { animation: history-panel-arrive .2s cubic-bezier(.2,.8,.2,1) both; }
.chat-mode .chat-ideas-history.panel-closing { animation: history-panel-dismiss .16s ease both; }
@keyframes overlay-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-dismiss { to { opacity: 0; } }
@keyframes history-panel-arrive { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes history-panel-dismiss { to { opacity: 0; transform: translateX(-8px); } }
.ticket.ticket-openable { cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.ticket.ticket-openable:hover { border-color: #765d66; background: #29272c; transform: translateY(-1px); }
.ticket.ticket-openable:focus-visible { outline: 2px solid #c08783; outline-offset: 2px; }
.ticket-detail-dialog { width: min(760px, calc(100vw - 32px)); max-width: none; max-height: min(82vh, 760px); overflow: auto; padding: 24px; border: 1px solid #49444a; border-radius: 18px; background: #202125; color: #efedf0; box-shadow: 0 30px 90px #0009; }
.ticket-detail-dialog::backdrop { background: #09090bd4; backdrop-filter: blur(7px); }
.ticket-detail-dialog[open] { animation: command-dialog-arrive .24s cubic-bezier(.2,.8,.2,1) both; }
#ticket-detail-dialog.is-closing { animation: command-dialog-dismiss .16s ease both; }
.ticket-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #37373c; }
.ticket-detail-header h2 { margin: 2px 0 5px; font-size: clamp(19px, 3vw, 25px); }
.ticket-detail-header p { margin: 0; color: #a8a6ad; font-size: 12px; }
.ticket-detail-close { flex: 0 0 34px; width: 34px; height: 34px; margin: 0; }
.ticket-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 22px 0; }
.ticket-progress-step { position: relative; min-width: 0; padding-top: 17px; color: #84838b; font-size: 10px; }
.ticket-progress-step::before { content: ''; position: absolute; top: 4px; left: 0; right: -8px; height: 2px; background: #424249; }
.ticket-progress-step:first-child::before { border-radius: 2px 0 0 2px; }
.ticket-progress-step:last-child::before { right: 0; border-radius: 0 2px 2px 0; }
.ticket-progress-step::after { content: ''; position: absolute; top: 0; left: 0; width: 10px; height: 10px; border: 2px solid #55545d; border-radius: 50%; background: #202125; }
.ticket-progress-step.done { color: #d8c7c5; }
.ticket-progress-step.done::before { background: #97615c; }
.ticket-progress-step.done::after { border-color: #ba8179; background: #ba8179; box-shadow: 0 0 9px #ba817955; }
.ticket-detail-checkpoints { display: grid; gap: 8px; }
.ticket-detail-checkpoints h3 { margin: 0 0 3px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #c8c4cb; }
.ticket-checkpoint { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #35353b; border-radius: 11px; background: #25262a; }
.ticket-checkpoint-dot { width: 8px; height: 8px; border-radius: 50%; background: #c08076; box-shadow: 0 0 8px #c0807650; }
.ticket-checkpoint strong { display: block; font-size: 12px; font-weight: 550; }
.ticket-checkpoint small { display: block; margin-top: 3px; color: #a2a0a8; font-size: 10px; }
.ticket-checkpoint time { color: #85838b; font-size: 10px; white-space: nowrap; }
.ticket-detail-description { margin: 16px 0 0; padding: 12px; border-radius: 10px; background: #25262a; color: #c5c2c9; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.api-blocking-dialog { width: max-content; max-width: calc(100vw - 32px); padding: 0; border: 1px solid #514b54; border-radius: 14px; background: #232328; color: #f4f1f3; box-shadow: 0 20px 70px #0009; }
.api-blocking-dialog::backdrop { background: #0a0a0db8; backdrop-filter: blur(5px); }
.api-blocking-dialog[open] { animation: command-dialog-arrive .18s ease both; }
.api-blocking-card { display: flex; align-items: center; gap: 12px; padding: 17px 21px; font-size: 13px; }
.api-progress { position: fixed; z-index: 10001; top: 0; left: 0; width: 100%; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.api-progress::after { content: ''; display: block; width: 35%; height: 100%; background: linear-gradient(90deg, transparent, #d18c84, #e9b2a9, transparent); transform: translateX(-110%); }
body.api-writing .api-progress { opacity: 1; }
body.api-writing .api-progress::after { animation: api-progress-sweep 1.05s ease-in-out infinite; }
@keyframes api-progress-sweep { to { transform: translateX(330%); } }
.ticket-detail-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #aaa7af; font-size: 10px; }
.ticket-detail-status.is-terminal .tag { border-color: #895a5a; background: #382629; color: #e4aaa4; }
.loading-spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid #ffffff30; border-top-color: #d58c82; border-radius: 50%; animation: loading-spin .7s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes command-dialog-dismiss { to { opacity: 0; transform: translateY(9px) scale(.99); } }
@media (max-width: 600px) { .ticket-detail-dialog { padding: 18px; } .ticket-progress-step { font-size: 9px; } .ticket-checkpoint { grid-template-columns: 8px minmax(0, 1fr); } .ticket-checkpoint time { grid-column: 2; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .skeleton::after { animation: none; } .skeleton { background: #292a30; } }
.credential-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.credential-card { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid #eee5d8; border-radius: 12px; background: #fffdfa; }
.credential-card p { margin: 0; font-size: 12px; line-height: 1.5; }
.credential-card-status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.credential-card-status.is-connected { color: #22874e; }
.credential-card-form { display: grid; gap: 8px; }
.credential-card-form[hidden] { display: none; }
.chat-logout { margin: 0 0 0 14px; padding: 7px 12px; border: 1px solid #3d3b40; border-radius: 9px; background: #222327; color: #c9c5d0; font-size: 12px; white-space: nowrap; }
.chat-logout:hover, .chat-logout:focus-visible { border-color: #8b5149; background: #2d292b; color: #f2d6d2; }
.credential-single-line { height: 42px; min-height: 0; resize: none; overflow-y: hidden; white-space: pre; overflow-x: auto; scrollbar-width: none; }
.credential-card-form label { margin-top: 0; }
.credential-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.credential-card-actions button { margin: 0; padding: 9px 13px; font-size: 13px; }
