:root {
  color-scheme: dark;
  --bg: #07101b;
  --panel: #0d1826;
  --panel-2: #111f30;
  --border: #24354a;
  --text: #e8eef7;
  --muted: #92a4ba;
  --accent: #45a3ff;
  --accent-2: #6bd9b1;
  --danger: #ff667d;
  --warning: #f0bd5b;
  --shadow: 0 18px 48px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.45rem, 3vw, 2.1rem); margin-bottom: .35rem; }
h2 { font-size: 1.08rem; margin-bottom: 0; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.hidden { display: none !important; }
.full { width: 100%; }
.stack { display: grid; gap: .8rem; }
.inline-controls { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
input, textarea, select { width: 100%; color: var(--text); background: #081320; border: 1px solid var(--border); border-radius: .7rem; padding: .72rem .8rem; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(69,163,255,.16); }
label { font-size: .86rem; color: var(--muted); }
.button { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); border-radius: .7rem; padding: .68rem .92rem; }
.button:hover { border-color: #3e5874; }
.button-primary { background: var(--accent); color: #03101d; border-color: transparent; font-weight: 700; }
.button-danger { background: rgba(255,102,125,.12); color: #ffb4c0; border-color: rgba(255,102,125,.45); }
.button-ghost { background: transparent; }
.button-small { padding: .42rem .62rem; font-size: .8rem; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: .28rem .58rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.badge-alpha { color: #9fd3ff; border-color: rgba(69,163,255,.55); background: rgba(69,163,255,.1); }
.badge-beta { color: #b2f1d8; border-color: rgba(107,217,177,.5); background: rgba(107,217,177,.09); }
.badge-ready { color: #ffe2a5; border-color: rgba(240,189,91,.5); background: rgba(240,189,91,.08); }
.brand-mark { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 1rem; background: linear-gradient(145deg, #57b5ff, #3967ec); color: #04101d; font-weight: 900; font-size: 1.45rem; box-shadow: var(--shadow); }
.brand-mark.compact { width: 2.35rem; height: 2.35rem; border-radius: .75rem; font-size: 1rem; }
.login-body { display: grid; min-height: 100vh; place-items: center; padding: 1.2rem; background: radial-gradient(circle at 50% 10%, #142841, var(--bg) 45%); }
.login-shell { width: min(100%, 430px); }
.login-card { background: rgba(13,24,38,.94); border: 1px solid var(--border); border-radius: 1.25rem; padding: 2rem; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 1.3rem; }
.alert { padding: .8rem; border-radius: .7rem; margin-bottom: 1rem; }
.alert-error { background: rgba(255,102,125,.11); border: 1px solid rgba(255,102,125,.4); color: #ffc0c9; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 1rem; border-right: 1px solid var(--border); background: #08121e; display: flex; flex-direction: column; }
.brand-row { display: flex; gap: .8rem; align-items: center; padding: .35rem .35rem 1.25rem; }
.nav-list { display: grid; gap: .32rem; }
.nav-item { text-align: left; color: var(--muted); border: 1px solid transparent; background: transparent; border-radius: .65rem; padding: .7rem .8rem; }
.nav-item:hover, .nav-item.active { color: var(--text); background: var(--panel); border-color: var(--border); }
.sidebar-footer { margin-top: auto; }
.main-content { min-width: 0; padding: 1.3rem 1.5rem 3rem; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.topbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.view { display: none; }
.view.active { display: block; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .85rem; margin-bottom: .9rem; }
.metric-card { background: var(--panel); border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; display: grid; gap: .35rem; }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { font-size: 1.55rem; }
.two-column { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.7fr); gap: .9rem; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: .8rem; align-items: center; margin-bottom: .9rem; }
.architecture-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .55rem; align-items: stretch; }
.flow-node { border: 1px solid var(--border); background: #091522; border-radius: .75rem; padding: .8rem; display: grid; gap: .3rem; }
.flow-node span { font-size: .78rem; color: var(--muted); }
.alpha-node { border-color: rgba(69,163,255,.4); }
.beta-node { border-color: rgba(107,217,177,.4); }
.flow-arrow { display: grid; place-items: center; color: var(--muted); }
.callout { margin-top: .8rem; border-left: 3px solid var(--warning); background: rgba(240,189,91,.06); padding: .8rem; color: #d9c391; font-size: .86rem; }
.chat-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: .9rem; }
.conversation-list { min-height: 70vh; }
.conversation-item { width: 100%; text-align: left; color: var(--muted); background: transparent; border: 0; border-bottom: 1px solid rgba(36,53,74,.7); padding: .75rem .25rem; }
.conversation-item:hover { color: var(--text); }
.chat-panel { min-height: 70vh; display: flex; flex-direction: column; }
.mode-control { width: 190px; }
.chat-messages { flex: 1; display: grid; align-content: start; gap: .8rem; max-height: 58vh; overflow: auto; padding-right: .25rem; }
.message { max-width: 85%; padding: .85rem; border-radius: .8rem; background: #091522; border: 1px solid var(--border); }
.message.user { margin-left: auto; background: rgba(69,163,255,.1); border-color: rgba(69,163,255,.35); }
.message p { white-space: pre-wrap; margin: .35rem 0 0; }
.agent-events { display: grid; gap: .35rem; margin: .7rem 0; }
.agent-event { border: 1px solid var(--border); border-radius: .6rem; padding: .55rem .7rem; color: var(--muted); font-size: .78rem; }
.agent-event.success { border-left: 3px solid var(--accent-2); }
.agent-event.failure { border-left: 3px solid var(--danger); }
.composer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem; align-items: end; border-top: 1px solid var(--border); padding-top: .8rem; }
.source-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: .9rem; }
.source-files-panel, .source-reader-panel { min-height: 72vh; }
.source-files { margin-top: .7rem; max-height: 62vh; overflow: auto; }
.source-file { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid rgba(36,53,74,.7); color: var(--muted); padding: .62rem .2rem; font-family: ui-monospace, monospace; font-size: .78rem; }
.source-file:hover { color: var(--text); }
.source-content { margin: 0; padding: .8rem; border: 1px solid var(--border); border-radius: .7rem; background: #06101b; max-height: 64vh; overflow: auto; white-space: pre; font-size: .8rem; line-height: 1.5; }
.log-list { display: grid; gap: .55rem; }
.log-entry { border: 1px solid var(--border); border-radius: .65rem; background: #07121e; padding: .7rem; }
.log-entry pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #c8d3e1; margin: .4rem 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: .7rem; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
dialog { color: var(--text); background: transparent; border: 0; padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-card { width: min(92vw, 520px); display: grid; gap: .75rem; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: 1.2rem; box-shadow: var(--shadow); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .55rem; }
.toast { position: fixed; right: 1rem; top: 1rem; bottom: auto; z-index: 10050; max-width: min(90vw, 480px); background: #14253a; border: 1px solid var(--border); border-radius: .75rem; padding: .8rem 1rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,102,125,.55); }
@media (max-width: 1000px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .architecture-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-list { grid-template-columns: repeat(5, minmax(0,1fr)); overflow-x: auto; }
  .nav-item { text-align: center; padding: .55rem .35rem; font-size: .72rem; }
  .sidebar-footer { display: none; }
  .main-content { padding: 1rem .75rem 2rem; }
  .topbar { align-items: flex-start; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .chat-layout, .source-layout { grid-template-columns: 1fr; }
  .conversation-list { min-height: auto; }
  .chat-panel { min-height: 68vh; }
  .source-files-panel, .source-reader-panel { min-height: auto; }
  .source-files { max-height: 30vh; }
  .composer { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .topbar { display: block; }
  .topbar-actions { justify-content: flex-start; margin-top: .7rem; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .mode-control { width: 100%; }
}
/* ── Grafo ──────────────────────────────────────────────── */
.graph-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: .9rem; }
.graph-panel { min-height: 72vh; }
.graph-tabs { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.graph-tab { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: .55rem; padding: .42rem .68rem; font-size: .8rem; }
.graph-tab:hover { color: var(--text); border-color: #3e5874; }
.graph-tab.active { color: var(--text); background: rgba(69,163,255,.12); border-color: rgba(69,163,255,.45); }
.graph-diagram { background: #06101b; border: 1px solid var(--border); border-radius: .8rem; padding: .8rem; min-height: 280px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.graph-placeholder { color: var(--muted); font-size: .88rem; text-align: center; padding: 2rem; }
.graph-placeholder.error { color: var(--danger); }
.graph-mermaid-details { margin-top: .7rem; }
.graph-mermaid-details summary { color: var(--muted); cursor: pointer; font-size: .82rem; }
.graph-mermaid-details pre { margin-top: .4rem; }
.graph-mermaid-pre { max-height: 200px; }
/* ── Fim Grafo ──────────────────────────────────────────── */

/* ── Árvore hierárquica de arquivos ────────────────────── */
.tree-view { margin-top: .7rem; max-height: 62vh; overflow: auto; }
.tree-node { user-select: none; }
.tree-row { display: flex; align-items: center; gap: .35rem; padding: .48rem .4rem; border-radius: .45rem; cursor: pointer; transition: background .15s ease; }
.tree-row:hover { background: rgba(69,163,255,.08); }
.tree-row:active { background: rgba(69,163,255,.14); }
.tree-toggle { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; color: var(--muted); flex-shrink: 0; transition: transform .2s ease; }
.tree-spacer { visibility: hidden; }
.tree-icon { font-size: .88rem; flex-shrink: 0; width: 20px; text-align: center; }
.tree-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-folder > .tree-row .tree-label { color: var(--text); font-weight: 500; }
.tree-file > .tree-row:hover .tree-label { color: var(--text); }
.tree-children { overflow: hidden; transition: max-height .25s ease, opacity .2s ease; }
.tree-children[style*="display: block"] { opacity: 1; }
.tree-children[style*="display: none"] { opacity: 0; }
.tree-file.selected > .tree-row { background: rgba(69,163,255,.16); border-left: 3px solid var(--accent); }
.tree-file.selected > .tree-row .tree-label { color: var(--accent); }
.tree-file.selected > .tree-row .tree-label { color: var(--accent); }
/* ── Fim Árvore ───────────────────────────────────────── */

/* ── Gerenciador de Arquivos ─────────────────────────── */
.source-toolbar { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .6rem; align-items: center; }
.source-toolbar .button { font-size: .78rem; padding: .42rem .62rem; }
.source-toolbar .button svg { vertical-align: middle; margin-right: .15rem; }
.source-editor-modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.75); padding: 1rem; }
.source-editor-modal.active { display: flex; align-items: center; justify-content: center; }
.source-editor-modal .modal-card { width: min(95vw, 900px); max-height: 90vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); }
.source-editor-modal .modal-header { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.source-editor-modal .modal-header h2 { font-size: .95rem; margin: 0; }
.source-editor-modal .modal-body { flex: 1; overflow: auto; padding: .6rem 1rem; }
.source-editor-modal .modal-body textarea { width: 100%; min-height: 400px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.55; resize: vertical; background: #06101b; border: 1px solid var(--border); border-radius: .65rem; padding: .7rem; color: var(--text); }
.source-editor-modal .modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--border); }
.source-preview { margin: .7rem 0; }
.source-preview img, .source-preview video, .source-preview audio { max-width: 100%; max-height: 55vh; border-radius: .7rem; border: 1px solid var(--border); }
.source-preview iframe { width: 100%; height: 55vh; border: 1px solid var(--border); border-radius: .7rem; }
.source-preview .preview-unsupported { padding: 2rem; text-align: center; color: var(--muted); }
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 12000; background: rgba(0,0,0,.6); }
.modal-overlay.active { display: block; }
.dialog-modal { display: none; position: fixed; inset: 0; z-index: 12010; padding: 1rem; align-items: center; justify-content: center; }
.dialog-modal.active { display: flex; }
.dialog-modal .dialog-card { width: min(95vw, 480px); display: grid; gap: .75rem; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: 1.2rem; box-shadow: var(--shadow); }
.tree-row-context { display: flex; gap: .3rem; margin-left: auto; opacity: 0; transition: opacity .15s; }
.tree-row:hover .tree-row-context { opacity: 1; }
.tree-row-context button { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: .35rem; padding: .15rem .35rem; font-size: .68rem; cursor: pointer; }
.tree-row-context button:hover { color: var(--text); background: var(--panel-2); }
.source-files-panel .tree-view { max-height: calc(72vh - 140px); }
.source-reader-panel .source-editable { cursor: pointer; }
.source-reader-panel .source-editable:hover { border-color: var(--accent); }
#source-content { white-space: pre-wrap; word-break: break-all; }
.upload-drop-zone { border: 2px dashed var(--border); border-radius: .7rem; padding: 1.5rem; text-align: center; color: var(--muted); margin: .5rem 0; transition: border-color .2s, background .2s; }
.upload-drop-zone.drag-over { border-color: var(--accent); background: rgba(69,163,255,.06); color: var(--text); }
.upload-drop-zone input[type="file"] { display: none; }
.context-menu { position: fixed; z-index: 110; background: var(--panel); border: 1px solid var(--border); border-radius: .65rem; padding: .35rem; box-shadow: var(--shadow); min-width: 160px; display: none; }
.context-menu.active { display: block; }
.context-menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: .5rem .7rem; border-radius: .4rem; font-size: .82rem; cursor: pointer; }
.context-menu button:hover { background: rgba(69,163,255,.12); }
.context-menu button.danger { color: var(--danger); }
.context-menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }
/* ── Fim Gerenciador ─────────────────────────────────── */

/* ── Storage Browser ─────────────────────────────────── */
.storage-layout { display: grid; grid-template-columns: 280px 340px minmax(0,1fr); gap: .9rem; }
.storage-nav-panel, .storage-objects-panel, .storage-reader-panel { min-height: 72vh; }
.storage-tree { margin-top: .7rem; max-height: 62vh; overflow: auto; }
.storage-item { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid rgba(36,53,74,.7); color: var(--muted); padding: .62rem .2rem; font-family: ui-monospace, monospace; font-size: .78rem; cursor: pointer; display: block; }
.storage-item:hover { color: var(--text); background: rgba(69,163,255,.06); }
.storage-item.selected { color: var(--accent); background: rgba(69,163,255,.12); border-left: 3px solid var(--accent); padding-left: .55rem; }
.storage-item .icon { margin-right: .35rem; }
.storage-item .size { float: right; font-size: .7rem; color: var(--muted); }
.storage-breadcrumb { display: flex; gap: .25rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); align-items: center; }
.storage-breadcrumb span { cursor: pointer; }
.storage-breadcrumb span:hover { color: var(--accent); }
.storage-breadcrumb .sep { cursor: default; color: var(--border); }
@media (max-width: 1000px) {
  .storage-layout { grid-template-columns: 1fr 1fr; }
  .storage-reader-panel { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .storage-layout { grid-template-columns: 1fr; }
}

.storage-heading-wrap { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.storage-project { border: 1px solid rgba(36,53,74,.8); border-radius: .65rem; margin-bottom: .55rem; background: rgba(8,19,32,.45); overflow: hidden; }
.storage-project > summary { list-style: none; cursor: pointer; padding: .65rem .7rem; display: flex; align-items: center; gap: .45rem; color: var(--text); font-size: .8rem; font-weight: 650; }
.storage-project > summary::-webkit-details-marker { display: none; }
.storage-project > summary::before { content: '▸'; color: var(--muted); transition: transform .15s ease; }
.storage-project[open] > summary::before { transform: rotate(90deg); }
.storage-project-id { display: block; color: var(--muted); font-family: ui-monospace, monospace; font-size: .68rem; font-weight: 400; margin-left: auto; }
.storage-project-body { padding: 0 .55rem .45rem; }
.storage-bucket-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .45rem; }
.storage-access { display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; padding: .16rem .42rem; color: var(--muted); font-size: .58rem; letter-spacing: .04em; }
.storage-access.read-only { color: var(--accent); border-color: rgba(69,163,255,.45); }
.storage-access.read-write { color: var(--warning); border-color: rgba(240,189,91,.45); }
.storage-access.admin { color: var(--success); border-color: rgba(84,211,153,.45); }
.storage-access.denied { color: var(--danger); border-color: rgba(239,112,112,.45); }
.storage-error { border: 1px solid rgba(239,112,112,.35); background: rgba(239,112,112,.07); color: var(--danger); border-radius: .55rem; padding: .55rem .65rem; font-size: .74rem; margin: .35rem 0; word-break: break-word; }
.storage-empty { color: var(--muted); padding: .8rem .2rem; font-size: .78rem; }
.storage-preview-media { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; margin: 0 auto; border-radius: .45rem; }
.storage-code { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, monospace; font-size: .78rem; line-height: 1.5; }
.compact-modal { max-width: 620px; }
@media (max-width: 640px) {
  .storage-project-id { width: 100%; margin-left: 1.2rem; }
  .storage-bucket-row { grid-template-columns: 1fr; }
}

/* ── Fim Storage Browser ──────────────────────────────── */

/* ── Limites do Agente (Visão geral) ──────────────────── */
.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}
.limits-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}
.limit-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: .7rem;
  padding: .75rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.limit-card label {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .02em;
}
.limit-card .limit-input-row {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.limit-card input[type="number"] {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: .88rem;
  font-weight: 600;
  padding: .45rem .5rem;
  background: #081320;
  border: 1px solid var(--border);
  border-radius: .5rem;
  color: var(--text);
  text-align: left;
  -moz-appearance: textfield;
}
.limit-card input[type="number"]::-webkit-inner-spin-button,
.limit-card input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.limit-card input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(69,163,255,.16);
  outline: none;
}
.limit-card .limit-steppers {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}
.limit-card .limit-step-btn {
  border: 1px solid var(--border);
  background: #0a1626;
  color: var(--muted);
  border-radius: .3rem;
  width: 26px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.limit-card .limit-step-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(69,163,255,.08);
}
.limit-card .limit-default {
  font-size: .68rem;
  color: var(--muted);
  opacity: .7;
}
.limit-card.modified input[type="number"] {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px rgba(240,189,91,.2);
}

@media (max-width: 900px) {
  .limits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .limits-grid {
    grid-template-columns: 1fr;
  }
}
/* ── Fim Limites do Agente ────────────────────────────── */

/* ── Runtime em tempo real / favicon state ─────────────────────── */
.runtime-status-strip {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: .72rem;
  padding: .62rem .78rem; background: #081522; color: var(--muted);
  font-size: .78rem; transition: border-color .18s, background .18s;
}
.runtime-status-strip[hidden] { display: none !important; }
.runtime-status-strip strong { color: var(--text); }
.runtime-pulse { width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.state-running { border-color: rgba(69,163,255,.55); background: rgba(69,163,255,.08); }
.state-running .runtime-pulse { background: var(--accent); box-shadow: 0 0 0 0 rgba(69,163,255,.55); animation: runtimePulse 1.35s infinite; }
.state-deploying { border-color: rgba(155,123,255,.62); background: rgba(155,123,255,.09); }
.state-deploying .runtime-pulse { background: #9b7bff; box-shadow: 0 0 0 0 rgba(155,123,255,.55); animation: runtimePulse 1s infinite; }
.state-completed { border-color: rgba(70,214,165,.55); background: rgba(70,214,165,.08); }
.state-completed .runtime-pulse { background: #46d6a5; }
.state-error { border-color: rgba(255,102,125,.62); background: rgba(255,102,125,.09); }
.state-error .runtime-pulse { background: var(--danger); }
.state-max_cycles { border-color: rgba(240,189,91,.62); background: rgba(240,189,91,.09); }
.state-max_cycles .runtime-pulse { background: var(--warning); }
.state-cancelled .runtime-pulse { background: #8a93a3; }
@keyframes runtimePulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.global-runtime-status { margin: -.25rem 0 1rem; position: sticky; top: .4rem; z-index: 35; box-shadow: var(--shadow); }
.runtime-elapsed { margin-left: auto; font-family: ui-monospace, monospace; }
.chat-runtime-bar { margin: .65rem 0; }
.chat-runtime-bar .runtime-stop { margin-left: auto; }

.runtime-process-list { display: grid; gap: .65rem; }
.runtime-process-card { border: 1px solid rgba(69,163,255,.38); background: rgba(69,163,255,.055); border-radius: .72rem; padding: .72rem .82rem; }
.runtime-process-card.deploying { border-color: rgba(155,123,255,.48); background: rgba(155,123,255,.07); }
.runtime-process-head { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.runtime-process-metrics { display: flex; gap: .5rem; flex-wrap: wrap; }
.runtime-process-metrics span { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .48rem; color: var(--muted); font-size: .72rem; }
.runtime-process-metrics b { color: var(--text); }
.runtime-empty { border: 1px dashed var(--border); border-radius: .72rem; padding: 1rem; display: grid; gap: .3rem; color: var(--muted); text-align: center; }
.runtime-empty.error { color: var(--danger); border-color: rgba(255,102,125,.4); }

.slide-confirm-wrap { position: relative; border: 1px solid var(--border); border-radius: 999px; padding: .18rem; background: #07121e; overflow: hidden; }
.slide-confirm { width: 100%; appearance: none; height: 2.6rem; padding: 0; margin: 0; background: transparent; position: relative; z-index: 2; cursor: grab; }
.slide-confirm:active { cursor: grabbing; }
.slide-confirm::-webkit-slider-runnable-track { height: 2.6rem; background: transparent; }
.slide-confirm::-moz-range-track { height: 2.6rem; background: transparent; }
.slide-confirm::-webkit-slider-thumb { appearance: none; width: 3.1rem; height: 2.25rem; margin-top: .175rem; border: 0; border-radius: 999px; background: var(--danger); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.slide-confirm::-moz-range-thumb { width: 3.1rem; height: 2.25rem; border: 0; border-radius: 999px; background: var(--danger); }
.slide-confirm-text { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: var(--muted); font-size: .78rem; letter-spacing: .02em; }

#storage-context-menu button[style*="display: none"] { display: none !important; }
.storage-item[data-storage-type] { position: relative; }
.storage-item[data-storage-type]::after { content: '⋮'; float: right; opacity: 0; color: var(--muted); margin-left: .35rem; }
.storage-item[data-storage-type]:hover::after { opacity: .75; }


.chat-runtime-bar {
  margin: .65rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .78rem;
  align-items: stretch;
  padding: .82rem .92rem;
}
.chat-runtime-bar .runtime-stop { margin-left: 0; }
.runtime-bar-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .75rem;
  align-items: start;
}
.runtime-bar-titleline {
  display: flex; align-items: center; gap: .62rem; flex-wrap: wrap;
}
.runtime-graph-badge {
  border-color: rgba(69,163,255,.28);
  background: rgba(69,163,255,.1);
  color: var(--text);
}
.runtime-bar-metrics {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.runtime-bar-metrics span,
.runtime-visual-caption span {
  border: 1px solid rgba(119,140,171,.24);
  border-radius: 999px;
  padding: .28rem .54rem;
  background: rgba(3, 10, 18, .28);
  color: var(--muted);
}
.runtime-bar-metrics b,
.runtime-visual-caption b { color: var(--text); }
.runtime-bar-actions { display: flex; align-items: center; justify-content: flex-end; }
.runtime-visual-strip {
  display: grid; gap: .58rem;
}
.runtime-visual-caption {
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.runtime-graph-shell {
  position: relative;
  height: clamp(330px, 43vh, 520px);
  min-height: 330px;
  border: 1px solid rgba(119,140,171,.28);
  border-radius: .95rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(69,163,255,.15), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(155,123,255,.16), transparent 28%),
    linear-gradient(180deg, rgba(4,12,20,.96), rgba(7,15,24,.92));
  overflow: hidden;
  contain: layout paint size;
}
#chat-runtime-graph {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#chat-runtime-graph:active { cursor: grabbing; }
.runtime-graph-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  max-width: min(340px, 70%);
}
.runtime-graph-help {
  position: absolute;
  right: .65rem;
  bottom: .55rem;
  z-index: 4;
  padding: .28rem .48rem;
  border: 1px solid rgba(119,140,171,.2);
  border-radius: .55rem;
  background: rgba(4,12,20,.72);
  color: rgba(188,205,227,.72);
  font-size: .7rem;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.runtime-graph-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .02em;
  pointer-events: none;
}
.runtime-graph-subtext { opacity: .72; font-size: .72rem; }
@media (max-width: 760px) {
  .chat-runtime-bar { align-items: stretch; }
  .runtime-bar-head { grid-template-columns: 1fr; }
  .runtime-bar-actions { justify-content: stretch; }
  .chat-runtime-bar .runtime-stop { width: 100%; }
  .runtime-bar-metrics { display: grid; grid-template-columns: 1fr 1fr; }
  .runtime-graph-shell { height: 300px; min-height: 300px; }
  #chat-runtime-graph { min-height: 0; }
}

/* ── Fim Runtime ──────────────────────────────────────────────── */

/* ── Respostas do agente e inspetor de processo ───────────────── */
.message { position: relative; }
.message-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 1.5rem; }
.message-header > strong { display: block; }
.message-actions { display: inline-flex; align-items: center; gap: .28rem; margin-left: auto; }
.message-action-icon {
  width: 1.75rem; height: 1.75rem; display: inline-grid; place-items: center;
  padding: 0; border: 1px solid transparent; border-radius: .45rem;
  background: transparent; color: var(--muted); cursor: pointer;
  font: 700 .95rem/1 system-ui, sans-serif; transition: color .15s, border-color .15s, background .15s;
}
.message-action-icon:hover, .message-action-icon:focus-visible {
  color: var(--text); border-color: var(--border); background: rgba(69,163,255,.09); outline: none;
}
.message-details-action:hover, .message-details-action:focus-visible { color: #9b7bff; border-color: rgba(155,123,255,.5); }

body.modal-open { overflow: hidden; }
.inspection-widget { z-index: 140; background: rgba(0,3,8,.88); backdrop-filter: blur(8px); }
.inspection-widget .inspection-card {
  width: min(98vw, 1500px); height: min(94vh, 980px); max-height: 94vh;
  background: #07111d; border-color: rgba(90,122,162,.55); overflow: hidden;
}
.inspection-header { min-height: 4.2rem; background: linear-gradient(90deg, rgba(69,163,255,.08), rgba(155,123,255,.07)); }
.inspection-header-left, .inspection-header-actions { display: flex; align-items: center; gap: .7rem; }
.inspection-header h2 { font-size: 1.05rem !important; }
.inspection-header .eyebrow { margin: 0 0 .2rem; }
.inspection-body { padding: 0 !important; min-height: 0; overflow: hidden !important; }
/* O atributo hidden deve vencer os displays grid/block do inspetor. */
.inspection-graph-view[hidden],
.inspection-detail-view[hidden],
.inspection-tooltip[hidden] { display: none !important; }
.inspection-graph-view { display: grid; grid-template-columns: minmax(0,1fr) 310px; height: 100%; min-height: 0; }
.inspection-canvas-shell { position: relative; min-width: 0; min-height: 0; background: #040a12; overflow: hidden; }
#inspection-canvas { display: block; width: 100%; height: 100%; min-height: 560px; touch-action: none; }
#inspection-canvas.rotating { cursor: grabbing !important; }
.inspection-canvas-help {
  position: absolute; left: 1rem; bottom: 1rem; border: 1px solid rgba(112,145,186,.35);
  border-radius: 999px; padding: .42rem .7rem; background: rgba(3,9,16,.8); color: var(--muted);
  font-size: .7rem; pointer-events: none;
}
.inspection-tooltip {
  position: absolute; z-index: 5; width: min(290px, calc(100% - 2rem)); pointer-events: none;
  border: 1px solid rgba(155,123,255,.55); border-radius: .65rem; padding: .58rem .68rem;
  background: rgba(7,17,29,.96); box-shadow: 0 14px 40px rgba(0,0,0,.45); color: var(--text);
}
.inspection-tooltip strong, .inspection-tooltip span { display: block; }
.inspection-tooltip span { margin-top: .25rem; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.inspection-summary { border-left: 1px solid var(--border); padding: 1rem; overflow: auto; background: #08131f; }
.inspection-summary-card { display: grid; gap: .28rem; padding: .8rem; border: 1px solid var(--border); border-radius: .72rem; background: rgba(10,24,40,.8); margin-bottom: .7rem; }
.inspection-summary-card strong { color: var(--text); font-size: .88rem; }
.inspection-summary-card span:last-child { color: var(--muted); font-size: .72rem; }
.inspection-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .09em; font-size: .61rem; font-weight: 750; }
.inspection-detail-view { height: 100%; overflow: auto; padding: 1rem 1.1rem 1.5rem; background: linear-gradient(180deg, #07111d, #050b13); }
.inspection-loading, .empty-state { border: 1px dashed var(--border); border-radius: .75rem; padding: 1.5rem; color: var(--muted); text-align: center; }
.inspection-scale-intro { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.inspection-scale-intro h3 { margin: .2rem 0 0; font-size: 1.05rem; }
.inspection-terminal-card { height: 100%; min-height: 0; }
.inspection-terminal-card pre, .inspection-json {
  margin: 0; width: 100%; min-height: 100%; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--border); border-radius: .78rem; padding: 1rem;
  background: #040b13; color: #dce9f8; font: 500 .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.inspection-cycle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.inspection-cycle-card, .inspection-event-card {
  display: grid; gap: .35rem; text-align: left; border: 1px solid var(--border); border-radius: .75rem;
  padding: .82rem; background: #091522; color: var(--text); cursor: pointer;
  transition: transform .14s, border-color .14s, background .14s;
}
.inspection-cycle-card:hover, .inspection-event-card:hover { transform: translateY(-1px); border-color: rgba(69,163,255,.62); background: rgba(69,163,255,.08); }
.inspection-cycle-card > span, .inspection-event-card > span { color: var(--muted); font-size: .7rem; }
.inspection-cycle-index, .inspection-event-sequence { color: var(--accent) !important; font-family: ui-monospace, monospace; }
.inspection-cycle-status { justify-self: start; border: 1px solid var(--border); border-radius: 999px; padding: .16rem .42rem; }
.inspection-cycle-status.status-failed, .inspection-event-card.failure { color: var(--danger); border-color: rgba(255,102,125,.45); }
.inspection-event-list { display: grid; gap: .55rem; }
.inspection-event-card { grid-template-columns: 70px minmax(180px,1fr) minmax(180px,auto); align-items: center; }
.inspection-event-card strong { min-width: 0; }
.inspection-event-card span:last-child { text-align: right; }
.inspection-json { min-height: 560px; overflow: auto; white-space: pre; }

@media (max-width: 900px) {
  .inspection-widget .inspection-card { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .inspection-graph-view { grid-template-columns: 1fr; grid-template-rows: minmax(430px, 1fr) auto; }
  .inspection-summary { border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; }
  .inspection-summary-card { margin-bottom: 0; }
  #inspection-canvas { min-height: 430px; }
}
@media (max-width: 640px) {
  .inspection-header { align-items: flex-start !important; }
  .inspection-summary { grid-template-columns: 1fr; }
  .inspection-event-card { grid-template-columns: 55px minmax(0,1fr); }
  .inspection-event-card span:last-child { grid-column: 2; text-align: left; }
  .message { max-width: 96%; }
}
/* ── Fim inspetor de processo ─────────────────────────────────── */

/* ── Editor PostgreSQL ───────────────────────────────────────── */
.database-heading { align-items: flex-end; }
.database-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1rem;
  min-height: 680px;
}
.database-tree-panel,
.database-workspace { min-height: 0; overflow: hidden; }
.database-tree-panel { display: flex; flex-direction: column; }
.database-tree-head { display: grid; gap: .75rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.database-tree-head input { width: 100%; }
.database-tree {
  min-height: 0; overflow: auto; padding: .55rem;
  display: grid; align-content: start; gap: .45rem;
}
.database-db {
  border: 1px solid var(--border); border-radius: .75rem;
  background: rgba(8,20,33,.75); overflow: hidden;
}
.database-db > summary,
.database-schema > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between; gap: .6rem; padding: .72rem .75rem;
}
.database-db > summary::-webkit-details-marker,
.database-schema > summary::-webkit-details-marker { display: none; }
.database-db > summary::before,
.database-schema > summary::before { content: '›'; color: var(--muted); transition: transform .14s; }
.database-db[open] > summary::before,
.database-schema[open] > summary::before { transform: rotate(90deg); }
.database-db-title { min-width: 0; display: grid; gap: .18rem; margin-right: auto; }
.database-db-title strong,
.database-schema-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.database-db-meta { color: var(--muted); font-size: .68rem; }
.database-schema { margin: 0 .45rem .45rem; border-top: 1px solid rgba(88,116,148,.18); }
.database-schema > summary { padding: .58rem .45rem; font-size: .82rem; }
.database-table-list { display: grid; gap: .25rem; padding: 0 .35rem .45rem 1rem; }
.database-tree-table {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .55rem;
  text-align: left; color: var(--text); background: transparent; border: 1px solid transparent;
  border-radius: .55rem; padding: .48rem .55rem; cursor: pointer;
}
.database-tree-table:hover { background: rgba(69,163,255,.08); border-color: rgba(69,163,255,.24); }
.database-tree-table.selected { background: rgba(69,163,255,.14); border-color: rgba(69,163,255,.52); }
.database-tree-table span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.database-access {
  flex: none; border: 1px solid var(--border); border-radius: 999px;
  padding: .12rem .38rem; font-size: .58rem; letter-spacing: .04em; color: var(--muted);
}
.database-access.write { color: var(--accent-2); border-color: rgba(70,214,165,.38); }
.database-access.alter { color: #c7a7ff; border-color: rgba(155,123,255,.45); }
.database-access.denied { color: var(--danger); border-color: rgba(255,102,125,.36); }
.database-partial-error { margin: .45rem .7rem .65rem; color: var(--danger); font-size: .7rem; overflow-wrap: anywhere; }
.database-workspace { display: flex; flex-direction: column; }
.database-workspace-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1rem .8rem; border-bottom: 1px solid var(--border);
}
.database-workspace-head h3 { margin: .3rem 0 .15rem; }
.database-toolbar { justify-content: flex-end; flex-wrap: wrap; }
.database-permissions { display: flex; flex-wrap: wrap; gap: .38rem; padding: .65rem 1rem; min-height: 2.4rem; border-bottom: 1px solid rgba(88,116,148,.18); }
.database-permission-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: .22rem .48rem;
  color: var(--muted); font-size: .65rem; letter-spacing: .04em;
}
.database-permission-chip.allowed { color: var(--accent-2); border-color: rgba(70,214,165,.38); background: rgba(70,214,165,.05); }
.database-permission-chip.denied { color: #7f8a98; opacity: .72; }
.database-empty {
  flex: 1; min-height: 480px; display: grid; place-content: center; justify-items: center;
  gap: .55rem; color: var(--muted); text-align: center; padding: 2rem;
}
.database-empty[hidden] { display: none !important; }
.database-empty-icon {
  width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 1rem;
  background: rgba(69,163,255,.08); border: 1px solid rgba(69,163,255,.28);
  color: var(--accent); font-weight: 800; letter-spacing: .06em;
}
.database-table-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.database-table-editor[hidden] { display: none !important; }
.database-tabs { display: flex; gap: .35rem; padding: .65rem 1rem 0; border-bottom: 1px solid var(--border); }
.database-tab {
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted);
  padding: .6rem .8rem; cursor: pointer; font-weight: 650;
}
.database-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.database-tab-panel { display: none; min-height: 0; flex: 1; overflow: auto; padding: .85rem 1rem 1rem; }
.database-tab-panel.active { display: block; }
.database-data-toolbar,
.database-panel-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  margin-bottom: .75rem;
}
.database-panel-toolbar > div { display: grid; gap: .2rem; }
.database-pagination { display: flex; align-items: center; gap: .45rem; }
.database-pagination select { width: auto; min-width: 70px; }
.database-grid-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: .7rem; background: #06111d; }
.database-data-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .76rem; }
.database-data-table th,
.database-data-table td { border-bottom: 1px solid rgba(88,116,148,.2); border-right: 1px solid rgba(88,116,148,.14); padding: .52rem .58rem; vertical-align: top; text-align: left; }
.database-data-table th { position: sticky; top: 0; z-index: 2; background: #0a1928; color: #cfe0f4; white-space: nowrap; }
.database-data-table tr:hover td { background: rgba(69,163,255,.035); }
.database-data-table td.database-cell-null { color: #8c78b7; font-style: italic; }
.database-cell-value { display: block; max-width: 360px; max-height: 7.5rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.database-row-actions { display: flex; gap: .35rem; white-space: nowrap; }
.database-object-list { display: grid; gap: .55rem; margin-bottom: 1rem; }
.database-object-card { border: 1px solid var(--border); border-radius: .7rem; padding: .72rem; background: #081522; display: grid; gap: .35rem; }
.database-object-card-head { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.database-object-card code { white-space: pre-wrap; overflow-wrap: anywhere; color: #bfd2e8; font-size: .72rem; }
.database-modal-card { width: min(94vw, 880px); max-height: 92vh; }
.database-modal-card .modal-body { overflow: auto; }
.database-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem; }
.database-form-field { display: grid; gap: .35rem; align-content: start; }
.database-form-field.full { grid-column: 1 / -1; }
.database-form-field small { color: var(--muted); }
.database-check-row { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; }
.database-check-row input { width: auto; }
.database-row-editor { display: grid; gap: .55rem; }
.database-row-field {
  display: grid; grid-template-columns: minmax(130px, 200px) minmax(0,1fr) auto auto;
  gap: .55rem; align-items: start; padding: .58rem; border: 1px solid rgba(88,116,148,.22); border-radius: .62rem;
}
.database-row-field-meta { display: grid; gap: .2rem; }
.database-row-field-meta code { color: var(--accent); }
.database-row-field textarea { min-height: 2.7rem; max-height: 9rem; resize: vertical; font-family: ui-monospace, monospace; }
.database-row-field label { display: flex; align-items: center; gap: .3rem; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.database-row-field label input { width: auto; }
.database-column-builder { display: grid; gap: .55rem; }
.database-column-builder-row {
  display: grid; grid-template-columns: minmax(120px,1fr) minmax(150px,1fr) auto auto auto minmax(120px,1fr) auto;
  gap: .45rem; align-items: center;
}
.database-column-builder-row input,
.database-column-builder-row select { min-width: 0; }
.database-warning {
  border: 1px solid rgba(240,189,91,.42); background: rgba(240,189,91,.07);
  color: #e9c980; border-radius: .65rem; padding: .65rem .75rem; font-size: .72rem;
}

@media (max-width: 1050px) {
  .database-layout { grid-template-columns: 1fr; }
  .database-tree-panel { max-height: 420px; }
  .database-workspace { min-height: 720px; }
}
@media (max-width: 720px) {
  .database-workspace-head,
  .database-data-toolbar,
  .database-panel-toolbar { align-items: stretch; flex-direction: column; }
  .database-form-grid { grid-template-columns: 1fr; }
  .database-form-field.full { grid-column: auto; }
  .database-row-field { grid-template-columns: 1fr; }
  .database-column-builder-row { grid-template-columns: 1fr 1fr; }
}
/* ── Fim editor PostgreSQL ───────────────────────────────────── */


/* ── Artifact Registry Images ─────────────────────────────── */
.images-heading { align-items: flex-end; }
.images-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(300px, 390px) minmax(420px, 1fr);
  gap: 1rem;
  min-height: 720px;
}
.images-repository-panel,
.images-versions-panel,
.images-detail-panel { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.images-panel-head {
  display: grid; gap: .65rem; padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.images-panel-head input { width: 100%; }
.images-versions-head { min-height: 92px; }
.images-tree,
.images-version-list,
.images-detail-scroll { min-height: 0; overflow: auto; }
.images-tree { padding: .55rem; display: grid; align-content: start; gap: .45rem; }
.images-repository {
  border: 1px solid var(--border); border-radius: .75rem;
  background: rgba(8,20,33,.75); overflow: hidden;
}
.images-repository > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between; gap: .65rem; padding: .72rem .75rem;
}
.images-repository > summary::-webkit-details-marker { display: none; }
.images-repository > summary::before {
  content: '›'; color: var(--muted); transition: transform .14s;
}
.images-repository[open] > summary::before { transform: rotate(90deg); }
.images-repository-title { min-width: 0; display: grid; gap: .18rem; margin-right: auto; }
.images-repository-title strong,
.images-image-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.images-repository-meta { color: var(--muted); font-size: .68rem; }
.images-image-list { display: grid; gap: .25rem; padding: 0 .45rem .55rem 1rem; }
.images-image-button {
  width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr);
  gap: .55rem; align-items: center; text-align: left; cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid transparent;
  border-radius: .6rem; padding: .52rem .55rem;
}
.images-image-button:hover { background: rgba(69,163,255,.08); border-color: rgba(69,163,255,.24); }
.images-image-button.selected { background: rgba(69,163,255,.14); border-color: rgba(69,163,255,.52); }
.images-image-icon { color: var(--accent); font-size: 1.05rem; }
.images-image-text { min-width: 0; display: grid; gap: .15rem; }
.images-image-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.images-partial-error,
.images-inline-warning {
  display: block; border: 1px solid rgba(240,189,91,.4);
  background: rgba(240,189,91,.07); color: #e9c980;
  border-radius: .55rem; padding: .55rem .65rem; font-size: .7rem;
  overflow-wrap: anywhere;
}
.images-version-list { padding: .7rem; display: grid; align-content: start; gap: .55rem; }
.images-version-card {
  width: 100%; display: grid; gap: .55rem; text-align: left; cursor: pointer;
  color: var(--text); background: #081522; border: 1px solid var(--border);
  border-radius: .72rem; padding: .72rem;
}
.images-version-card:hover { border-color: rgba(69,163,255,.48); background: rgba(69,163,255,.06); }
.images-version-card.selected { border-color: var(--accent); background: rgba(69,163,255,.12); }
.images-version-card-head,
.images-object-card-head,
.images-section-title,
.images-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem;
}
.images-version-card code { color: #cfe0f4; overflow-wrap: anywhere; }
.images-version-dates { display: flex; flex-wrap: wrap; gap: .45rem 1rem; color: var(--muted); font-size: .68rem; }
.images-tag-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.images-tag {
  display: inline-flex; align-items: center; max-width: 100%;
  border: 1px solid rgba(69,163,255,.35); border-radius: 999px;
  background: rgba(69,163,255,.07); color: #bcdcff;
  padding: .18rem .45rem; font-size: .66rem; overflow-wrap: anywhere;
}
.images-tag.more { color: var(--muted); border-color: var(--border); background: transparent; }
.images-placeholder {
  flex: 1; min-height: 320px; display: grid; place-content: center; justify-items: center;
  gap: .55rem; color: var(--muted); text-align: center; padding: 2rem;
}
.images-placeholder[hidden],
.images-detail[hidden] { display: none !important; }
.images-placeholder-icon {
  width: 4rem; height: 4rem; display: grid; place-items: center;
  border-radius: 1rem; background: rgba(69,163,255,.08);
  border: 1px solid rgba(69,163,255,.28); color: var(--accent);
  font-weight: 800; letter-spacing: .06em;
}
.images-placeholder-error .images-placeholder-icon {
  color: var(--danger); border-color: rgba(255,102,125,.4); background: rgba(255,102,125,.07);
}
.images-spinner {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 3px solid rgba(69,163,255,.2); border-top-color: var(--accent);
  animation: images-spin .8s linear infinite;
}
@keyframes images-spin { to { transform: rotate(360deg); } }
.images-detail { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.images-detail-head { padding: 1rem; border-bottom: 1px solid var(--border); }
.images-detail-title-wrap { min-width: 0; }
.images-detail-title-wrap h3 { margin: .35rem 0 .15rem; overflow-wrap: anywhere; }
.images-detail-actions { flex-wrap: wrap; justify-content: flex-end; }
.images-permissions {
  display: flex; flex-wrap: wrap; gap: .38rem; padding: .62rem 1rem;
  border-bottom: 1px solid rgba(88,116,148,.18);
}
.images-permission-chip {
  border: 1px solid var(--border); border-radius: 999px;
  padding: .2rem .46rem; color: var(--muted); font-size: .64rem;
}
.images-permission-chip.allowed { color: var(--accent-2); border-color: rgba(70,214,165,.38); }
.images-permission-chip.denied { color: #7f8a98; opacity: .75; }
.images-detail-scroll { flex: 1; padding: 0 1rem 1rem; }
.images-detail-section { padding: 1rem 0; border-bottom: 1px solid rgba(88,116,148,.2); }
.images-detail-section:last-child { border-bottom: 0; }
.images-section-title { margin-bottom: .7rem; }
.images-section-title h4 { margin: .18rem 0 0; }
.images-summary-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem;
}
.images-summary-card {
  min-width: 0; border: 1px solid var(--border); border-radius: .68rem;
  background: #081522; padding: .65rem; display: grid; gap: .22rem;
}
.images-summary-card span { color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.images-summary-card strong { overflow-wrap: anywhere; }
.images-summary-card small { color: var(--muted); overflow-wrap: anywhere; }
.images-code-block {
  margin-top: .7rem; display: grid; gap: .35rem; padding: .65rem;
  border: 1px solid var(--border); border-radius: .68rem; background: #06111d;
}
.images-code-block span { color: var(--muted); font-size: .68rem; }
.images-code-block code { overflow-wrap: anywhere; color: #cfe0f4; }
.images-tags-block { margin-top: .7rem; }
.images-object-list { display: grid; gap: .55rem; }
.images-object-card {
  border: 1px solid var(--border); border-radius: .68rem; background: #081522;
  padding: .68rem; display: grid; gap: .32rem;
}
.images-object-card code,
.images-object-card pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.images-object-card pre { margin: 0; font-size: .7rem; color: #bfd2e8; }
.images-notices { display: grid; gap: .45rem; margin: .65rem 0; }
.images-raw-details { border: 1px solid var(--border); border-radius: .68rem; overflow: hidden; }
.images-raw-details summary { cursor: pointer; padding: .7rem; }
.images-raw-details pre {
  margin: 0; max-height: 520px; overflow: auto; border-top: 1px solid var(--border);
  background: #06111d; padding: .75rem; white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: .7rem;
}

@media (max-width: 1280px) {
  .images-layout { grid-template-columns: minmax(280px, 340px) minmax(0,1fr); }
  .images-detail-panel { grid-column: 1 / -1; min-height: 720px; }
}
@media (max-width: 800px) {
  .images-layout { grid-template-columns: 1fr; }
  .images-detail-panel { grid-column: auto; }
  .images-summary-grid { grid-template-columns: 1fr; }
  .images-detail-head { flex-direction: column; }
}
/* ── Fim Artifact Registry Images ──────────────────────────── */

/* ── Graph Studio 3D V1 ───────────────────────────────────────── */
.graph-studio-shell { display: grid; gap: .75rem; min-width: 0; }
.graph-studio-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; }
.graph-studio-toolbar h2 { margin: .08rem 0 .18rem; }
.graph-studio-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.graph-studio-actions select { min-width: 145px; }
.graph-studio-notice { margin: 0; }
.graph-studio-grid { display: grid; grid-template-columns: minmax(230px, .78fr) minmax(460px, 1.65fr) minmax(330px, 1.08fr); gap: .75rem; min-height: calc(100vh - 210px); }
.graph-catalog-panel, .graph-visual-panel, .graph-code-panel { min-width: 0; overflow: hidden; }
.compact-heading { padding-bottom: .65rem; margin-bottom: .65rem; }
.compact-heading h3 { margin: .08rem 0 0; }
.graph-catalog-panel { display: flex; flex-direction: column; }
.graph-catalog-panel > input { margin: 0 .75rem .65rem; width: calc(100% - 1.5rem); }
.graph-studio-catalog { overflow: auto; padding: 0 .55rem .75rem; flex: 1; min-height: 400px; }
.graph-catalog-group { border-top: 1px solid var(--border); }
.graph-catalog-heading { width: 100%; display: flex; justify-content: space-between; gap: .5rem; border: 0; background: transparent; color: var(--muted); padding: .7rem .35rem .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }
.graph-catalog-list { display: grid; gap: .32rem; padding-bottom: .55rem; }
.graph-component-item { border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); text-align: left; padding: .58rem .64rem; cursor: pointer; display: grid; gap: .18rem; }
.graph-component-item:hover { border-color: var(--border); background: rgba(69,163,255,.05); }
.graph-component-item.active { border-color: rgba(69,163,255,.48); background: rgba(69,163,255,.12); }
.graph-component-item.warning { border-color: rgba(240,189,91,.35); }
.graph-component-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.graph-component-item span { color: var(--muted); font: .68rem ui-monospace, SFMono-Regular, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-studio-empty { color: var(--muted); padding: 1rem; text-align: center; }
.graph-studio-empty.error { color: var(--danger); }
.graph-visual-panel { display: flex; flex-direction: column; align-self: start; }
.graph-visual-panel[hidden] { display: none !important; }
.graph-visual-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.graph-3d-shell { position: relative; flex: 0 0 clamp(480px, 62vh, 700px); height: clamp(480px, 62vh, 700px); min-height: 0; max-height: 700px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; contain: layout paint size; overscroll-behavior: contain; background: radial-gradient(circle at 50% 45%, rgba(36,70,107,.22), rgba(5,17,30,.78) 66%); }
#graph-studio-canvas { width: 100%; height: 100%; min-height: 0; display: block; cursor: grab; touch-action: none; }
#graph-studio-canvas:active { cursor: grabbing; }
.graph-studio-canvas-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .45rem; color: var(--muted); text-align: center; pointer-events: none; }
.graph-studio-canvas-empty[hidden] { display: none !important; }
.graph-studio-empty-icon { width: 56px; height: 56px; border: 1px solid rgba(69,163,255,.42); border-radius: 16px; display: grid; place-items: center; color: var(--accent); font-weight: 900; }
.graph-selection-summary { min-height: 38px; padding: .58rem .7rem; border: 1px solid var(--border); border-radius: 10px; margin-top: .58rem; color: var(--muted); font: .76rem ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.graph-conditional-warning { margin-top: .55rem; font-size: .75rem; }
.graph-code-panel { display: flex; flex-direction: column; }
.graph-code-meta { padding: 0 .75rem .55rem; color: var(--muted); font: .68rem ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.graph-code-editor { flex: 1; min-height: 430px; width: calc(100% - 1.5rem); margin: 0 .75rem; resize: vertical; border-radius: 10px; background: #061220; color: #d9e9fb; border: 1px solid var(--border); padding: .75rem; font: 12px/1.52 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; white-space: pre; overflow: auto; }
.graph-code-editor:disabled { opacity: .62; }
.graph-validation-panel { margin: .65rem .75rem .75rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-height: 205px; display: flex; flex-direction: column; }
.graph-validation-heading { display: flex; align-items: center; justify-content: space-between; padding: .5rem .6rem; background: rgba(69,163,255,.05); border-bottom: 1px solid var(--border); }
.graph-validation-results { overflow: auto; padding: .45rem; display: grid; gap: .35rem; }
.graph-validation-item { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 8px; padding: .42rem .5rem; text-align: left; font-size: .73rem; }
button.graph-validation-item { cursor: pointer; }
.graph-validation-item.error { border-color: rgba(255,102,125,.42); color: #ff9bac; }
.graph-validation-item.warning { border-color: rgba(240,189,91,.42); color: #f0bd5b; }
.graph-validation-item.success { border-color: rgba(70,214,165,.38); color: #73e2bb; }
.badge-danger { border-color: rgba(255,102,125,.44) !important; color: var(--danger) !important; }

@media (max-width: 1450px) {
  .graph-studio-grid { grid-template-columns: minmax(220px, .72fr) minmax(440px, 1.45fr); }
  .graph-code-panel { grid-column: 1 / -1; min-height: 520px; }
  .graph-code-editor { min-height: 370px; }
}
@media (max-width: 920px) {
  .graph-studio-toolbar { align-items: flex-start; flex-direction: column; }
  .graph-studio-actions { justify-content: flex-start; }
  .graph-studio-grid { grid-template-columns: 1fr; }
  .graph-code-panel { grid-column: auto; }
  .graph-3d-shell, #graph-studio-canvas { min-height: 430px; }
}


/* Graph Studio UI hotfix v1 */
@media (min-width: 921px) {
  .graph-studio-shell.graph-text-only .graph-studio-grid { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
  .graph-studio-shell.graph-text-only .graph-code-panel { grid-column: auto; min-height: calc(100vh - 220px); }
  .graph-studio-shell.graph-text-only .graph-code-editor { min-height: clamp(540px, 68vh, 900px); font-size: 13px; }
}
@media (max-width: 920px) {
  .graph-3d-shell { flex-basis: clamp(400px, 58vh, 580px); height: clamp(400px, 58vh, 580px); max-height: 580px; }
}

/* Runtime Live Graph Inspection V3 */
.runtime-bar-actions{gap:.45rem;flex-wrap:wrap}.runtime-cycle-content{border:1px solid rgba(69,163,255,.26);border-radius:.8rem;padding:.7rem .8rem;background:linear-gradient(90deg,rgba(69,163,255,.08),rgba(155,123,255,.055));display:grid;gap:.32rem}.runtime-cycle-content[hidden]{display:none!important}.runtime-cycle-content-label{color:var(--accent);font-size:.64rem;text-transform:uppercase;letter-spacing:.09em;font-weight:750}.runtime-cycle-content p{margin:0;color:var(--text);line-height:1.45;font-size:.82rem;white-space:pre-wrap}#inspect-live-run.live{border-color:rgba(70,214,165,.55);box-shadow:0 0 0 1px rgba(70,214,165,.12) inset}.inspection-live-indicator{display:inline-flex;align-items:center;gap:.38rem;color:var(--success,#46d6a5);font-size:.67rem;font-weight:700}.inspection-live-indicator::before{content:"";width:.48rem;height:.48rem;border-radius:50%;background:currentColor;box-shadow:0 0 10px currentColor;animation:runtimeNodeBlink 1s ease-in-out infinite}

/* ── Rich output / Architect Hypertext V1 ─────────────────────────── */
.message-body { margin-top: .42rem; min-width: 0; }
.message.user .message-body { white-space: pre-wrap; }
.rich-output { color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.rich-output > :first-child { margin-top: 0; }
.rich-output > :last-child { margin-bottom: 0; }
.rich-output h1,
.rich-output h2,
.rich-output h3,
.rich-output h4,
.rich-output h5,
.rich-output h6 { color: #edf5ff; line-height: 1.22; margin: 1.05em 0 .45em; letter-spacing: -.01em; }
.rich-output h1 { font-size: 1.35rem; }
.rich-output h2 { font-size: 1.18rem; }
.rich-output h3 { font-size: 1.04rem; }
.rich-output h4, .rich-output h5, .rich-output h6 { font-size: .96rem; }
.rich-output p { white-space: normal; margin: .55rem 0; }
.rich-output ul, .rich-output ol { margin: .55rem 0 .7rem 1.25rem; padding: 0; }
.rich-output li { margin: .24rem 0; }
.rich-output a { color: #79bbff; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.rich-output a:hover { color: #a7d3ff; }
.rich-output code { padding: .1rem .32rem; border-radius: .32rem; background: rgba(135,155,180,.13); color: #d8e8fa; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .91em; }
.rich-output pre.rich-code-block,
.rich-output .rich-block-error pre { overflow: auto; border: 1px solid var(--border); border-radius: .72rem; background: #050d16; padding: .8rem; margin: .7rem 0; }
.rich-output pre.rich-code-block code,
.rich-output .rich-block-error pre code { padding: 0; background: transparent; white-space: pre; font-size: .78rem; }
.rich-output blockquote { margin: .7rem 0; border-left: 3px solid rgba(69,163,255,.55); padding: .18rem .8rem; background: rgba(69,163,255,.055); color: #b8c9dc; border-radius: 0 .45rem .45rem 0; }
.rich-output blockquote p { margin: .3rem 0; }
.rich-output hr { border: 0; border-top: 1px solid rgba(119,140,171,.28); margin: 1rem 0; }
.rich-inline-image, .rich-media { display: block; max-width: 100%; max-height: 560px; object-fit: contain; border-radius: .75rem; margin: .65rem 0; border: 1px solid rgba(119,140,171,.25); background: #050d16; }
.rich-audio { width: 100%; margin: .65rem 0; }
.rich-media-external { display: inline-flex; padding: .48rem .65rem; border: 1px dashed rgba(119,140,171,.4); border-radius: .55rem; background: rgba(119,140,171,.06); }
.rich-table-wrap { width: 100%; overflow: auto; margin: .75rem 0; border: 1px solid rgba(119,140,171,.26); border-radius: .7rem; }
.rich-output table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: .8rem; }
.rich-output th, .rich-output td { padding: .52rem .62rem; text-align: left; border-bottom: 1px solid rgba(119,140,171,.2); vertical-align: top; }
.rich-output th { position: sticky; top: 0; background: #0d1d2e; color: #e7f1fd; font-weight: 720; }
.rich-output tbody tr:nth-child(even) { background: rgba(119,140,171,.035); }
.rich-output tbody tr:hover { background: rgba(69,163,255,.06); }
.rich-figure { margin: .85rem 0; padding: .65rem; border: 1px solid rgba(119,140,171,.28); border-radius: .85rem; background: linear-gradient(180deg, rgba(8,19,31,.96), rgba(5,13,22,.95)); overflow: hidden; }
.rich-figure figcaption { font-weight: 700; color: #e2edf9; margin: .08rem .12rem .6rem; }
.rich-canvas { display: block; width: 100%; max-width: 100%; border-radius: .55rem; background: rgba(3,10,17,.44); }
.rich-block-error { margin: .7rem 0; padding: .65rem; border: 1px solid rgba(255,107,122,.4); border-radius: .7rem; background: rgba(255,107,122,.06); }
.rich-block-error > strong { color: #ff9ba7; }
.rich-map .rich-canvas { background: #07131f; }
@media (max-width: 760px) {
  .rich-output table { min-width: 400px; }
  .rich-figure { padding: .45rem; }
}
/* ── Fim Rich output ──────────────────────────────────────────────── */


/* Rich Output Graph 3D V1 */
.rich-graph-3d-shell {
  position: relative;
  height: clamp(380px, 52vh, 620px);
  min-height: 380px;
  overflow: hidden;
  border-radius: .65rem;
  border: 1px solid rgba(119,140,171,.22);
  background:
    radial-gradient(circle at 50% 45%, rgba(36,70,107,.20), rgba(3,10,17,.82) 68%),
    #07131f;
  contain: layout paint size;
  overscroll-behavior: contain;
}
.rich-graph-3d-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
  touch-action: none;
}
.rich-graph-3d-canvas:active { cursor: grabbing; }
.rich-graph-3d-tooltip {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}
.rich-graph-3d-help {
  position: absolute;
  left: .7rem;
  bottom: .65rem;
  z-index: 3;
  max-width: calc(100% - 1.4rem);
  padding: .32rem .55rem;
  border: 1px solid rgba(119,140,171,.26);
  border-radius: 999px;
  background: rgba(3,10,17,.76);
  color: #8fa4bf;
  font-size: .69rem;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.rich-graph-3d-unavailable {
  display: grid;
  place-items: center;
}
@media (max-width: 760px) {
  .rich-graph-3d-shell {
    height: 420px;
    min-height: 360px;
  }
}

/* concurrency-storage-v1: processos concorrentes lado a lado com mini-topologia */
.runtime-process-list { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.runtime-process-graph { min-height: 126px; margin: .55rem 0 .7rem; border: 1px solid rgba(117,151,193,.18); border-radius: 10px; background: rgba(2,10,22,.35); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.runtime-mini-svg { width: 100%; height: 126px; display:block; }
.runtime-mini-edge { stroke: rgba(132,161,197,.34); stroke-width: 1.25; }
.runtime-mini-node circle { fill: rgba(120,143,170,.62); stroke: rgba(180,202,226,.72); stroke-width: 1; }
.runtime-mini-node.active circle { fill: #45b7ff; stroke: #bfe9ff; stroke-width: 2; filter: drop-shadow(0 0 5px rgba(69,183,255,.9)); }

/* ── Storage browser workspace v2 ─────────────────────────── */
.storage-layout-unified { grid-template-columns: minmax(0, 1fr); }
.storage-unified-panel, .storage-reader-panel { min-height: min(760px, 76vh); }
.storage-unified-panel { display:flex; flex-direction:column; gap:.8rem; }
.storage-heading-wrap { align-items:flex-start; }
.storage-heading-main { min-width:0; display:grid; gap:.18rem; }
.storage-icon-toolbar { display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; }
.storage-toolbar-separator { width:1px; height:1.7rem; background:rgba(255,255,255,.1); margin:0 .15rem; }
.storage-icon-button { width:2.2rem; min-width:2.2rem; height:2.1rem; padding:0; display:inline-grid; place-items:center; font-size:1rem; line-height:1; }
.storage-icon-button.active { border-color:rgba(104,202,255,.58); background:rgba(77,169,236,.14); box-shadow:inset 0 0 0 1px rgba(104,202,255,.12); }
.storage-breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:.28rem; min-height:1.65rem; margin-top:.18rem; color:var(--muted); }
.storage-breadcrumb .sep { opacity:.45; }
.storage-breadcrumb .storage-path-part { appearance:none; border:0; padding:.12rem .28rem; border-radius:6px; background:transparent; color:#9ccfff; cursor:pointer; font:inherit; }
.storage-breadcrumb .storage-path-part:hover { background:rgba(108,198,255,.10); color:#d9f4ff; }
.storage-breadcrumb .storage-path-current { padding:.12rem .28rem; color:#e9f6ff; font-weight:600; }
.storage-toolbar-grid { display:grid; gap:.65rem; }
.storage-selection-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; padding:.42rem .55rem; border:1px solid rgba(255,255,255,.07); border-radius:10px; background:rgba(255,255,255,.018); }
.storage-browser-grid { min-height:520px; max-height:72vh; overflow:auto; align-content:start; padding:.35rem; }
.storage-browser-grid.storage-view-icons { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.7rem; }
.storage-browser-grid.storage-view-list { display:grid; grid-template-columns:1fr; gap:.18rem; }
.storage-browser-item { position:relative; min-width:0; user-select:none; cursor:default; border:1px solid transparent; color:inherit; background:transparent; transition:background .12s ease,border-color .12s ease,transform .12s ease; }
.storage-view-icons .storage-browser-item { min-height:132px; display:grid; grid-template-rows:70px auto auto; place-items:center; align-content:center; gap:.35rem; padding:.8rem .55rem; border-radius:12px; text-align:center; }
.storage-view-icons .storage-browser-item:hover { background:rgba(255,255,255,.065); }
.storage-view-icons .storage-browser-item .storage-browser-icon { font-size:2.8rem; line-height:1; }
.storage-view-icons .storage-browser-item .storage-browser-name { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.storage-view-icons .storage-browser-item .storage-node-meta { font-size:.75rem; opacity:.62; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.storage-view-list .storage-browser-item { min-height:2.35rem; display:grid; grid-template-columns:2rem minmax(0,1fr) auto; align-items:center; gap:.5rem; padding:.3rem .5rem; border-radius:8px; }
.storage-view-list .storage-browser-item:hover { background:rgba(255,255,255,.065); }
.storage-view-list .storage-browser-item .storage-browser-icon { font-size:1.15rem; text-align:center; }
.storage-view-list .storage-browser-item .storage-browser-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.storage-view-list .storage-browser-item .storage-node-meta { font-size:.78rem; opacity:.66; white-space:nowrap; }
.storage-inline-create .storage-inline-name { width:min(220px,100%); min-width:0; border:1px solid rgba(113,203,255,.65); border-radius:7px; background:#071523; color:inherit; padding:.34rem .48rem; text-align:center; outline:none; box-shadow:0 0 0 2px rgba(74,170,230,.12); }
.storage-view-list .storage-inline-create .storage-inline-name { width:100%; text-align:left; }
.storage-inline-create.saving { opacity:.65; }
.storage-browser-item.selected { border-color:rgba(101,157,255,.58); background:rgba(101,157,255,.14); }
.storage-browser-item.selected:hover { background:rgba(101,157,255,.20); }
.storage-browser-item.focused { box-shadow:inset 0 0 0 1px rgba(120,195,255,.8); }
.storage-reader-panel { display:flex; flex-direction:column; min-width:0; }
.storage-reader-heading { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-height:2.5rem; padding:.35rem .55rem; }
.storage-reader-toolbar .storage-icon-toolbar { margin-left:auto; }
.storage-back-button { width:2.15rem; min-width:2.15rem; height:2.05rem; padding:0; font-size:1.2rem; display:grid; place-items:center; }
.storage-reader-panel .source-content, .storage-reader-panel .source-preview { min-height:0; height:calc(76vh - 3.3rem); max-height:none; overflow:auto; margin:0; }
.storage-reader-panel .source-preview img { max-width:100%; max-height:calc(76vh - 3.8rem); object-fit:contain; display:block; margin:auto; }
.storage-node-meta { font-size:.78rem; opacity:.7; white-space:nowrap; }
/* legacy tree styles kept for transfer/destination dialogs */
.storage-tree-node { display:block; }
.storage-tree-row { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; align-items:center; gap:.45rem; width:calc(100% - (var(--tree-depth,0) * 1.25rem)); margin-left:calc(var(--tree-depth,0) * 1.25rem); min-height:2rem; padding:.3rem .45rem; border-radius:8px; border:1px solid transparent; background:transparent; color:inherit; text-align:left; cursor:default; user-select:none; }
.storage-tree-row:hover { background:rgba(255,255,255,.075); }
.storage-tree-row.selected { border-color:rgba(101,157,255,.58); background:rgba(101,157,255,.14); }
.storage-tree-row.focused { box-shadow:inset 3px 0 0 rgba(101,157,255,.9); }
.storage-tree-label { display:flex; align-items:center; gap:.45rem; min-width:0; justify-self:stretch; }
.storage-tree-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.storage-tree-icon { width:1.15rem; flex:0 0 1.15rem; text-align:center; }
.storage-tree-children { margin-left:0; padding-left:0; position:relative; }
.storage-node-toggle { width:1.2rem; height:1.2rem; border-radius:5px; border:none; background:transparent; color:inherit; cursor:pointer; padding:0; }
.storage-node-toggle.placeholder { visibility:hidden; }
#storage-delete-confirm { background:#b4232f; border-color:#dc4150; color:#fff; box-shadow:0 0 0 1px rgba(255,70,86,.12), 0 8px 20px rgba(118,18,31,.22); }
#storage-delete-confirm:hover:not(:disabled) { background:#c92a38; border-color:#f05a68; }
#storage-delete-confirm:active:not(:disabled) { transform:translateY(1px); background:#9d1c28; }
#storage-delete-confirm.is-busy, #storage-delete-confirm:disabled { background:#7f2430; border-color:#9c3b45; color:#ffd9dd; cursor:progress; opacity:1; }
.storage-context-menu {
  position: fixed; z-index: 1000; min-width: 220px; padding: 0.35rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: #09111f; box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.storage-context-summary { padding: .4rem .6rem .5rem; margin-bottom: .2rem; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .78rem; opacity: .72; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-context-menu button { display: block; width: 100%; text-align: left; padding: 0.5rem 0.6rem; border-radius: 8px; border: none; background: transparent; color: inherit; }
.storage-context-menu button:hover:not(:disabled) { background: rgba(255,255,255,0.07); }
.storage-context-menu button:disabled { opacity: .38; cursor: not-allowed; }
.large-modal { width: min(1100px, 92vw); }
.storage-transfer-tree { min-height: 380px; max-height: 55vh; overflow: auto; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 0.4rem; }
.storage-transfer-destination { display: grid; gap: 1rem; }
.storage-transfer-summary { padding: 0.25rem 0; }
.storage-transfer-current { padding: 0 0 0.5rem; }
.storage-transfer-create-bucket { display: grid; gap: 0.5rem; }
.storage-transfer-tree .storage-tree-row.active-target { border-color: rgba(82, 215, 132, 0.4); background: rgba(82, 215, 132, 0.08); }
.storage-destination-overlay { position: fixed; inset: 0; z-index: 13050; display: grid; place-items: center; padding: 3vh 3vw; background: rgba(2,9,18,.82); backdrop-filter: blur(5px); }
.storage-destination-world { position: relative; isolation: isolate; width: min(1180px, 94vw); height: min(760px, 88vh); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid rgba(113,203,255,.22); border-radius: 24px; background: radial-gradient(circle at 72% 40%, rgba(38,121,162,.18), transparent 34%), radial-gradient(circle at 25% 80%, rgba(22,95,75,.16), transparent 30%), #061321; box-shadow: 0 32px 90px rgba(0,0,0,.58), inset 0 0 70px rgba(28,153,208,.05); }
.storage-destination-stars { position: absolute; inset: 0; z-index: -1; opacity: .28; background-image: radial-gradient(circle at 20% 20%, rgba(96,214,255,.75) 0 1px, transparent 2px), radial-gradient(circle at 70% 30%, rgba(120,255,208,.7) 0 1px, transparent 2px), radial-gradient(circle at 45% 78%, rgba(96,214,255,.55) 0 1px, transparent 2px); background-size: 110px 110px, 170px 170px, 220px 220px; }
.storage-destination-header, .storage-destination-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-color: rgba(255,255,255,.08); background: rgba(4,14,27,.86); }
.storage-destination-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.storage-destination-footer { border-top: 1px solid rgba(255,255,255,.08); }
.storage-destination-header h2 { margin: .15rem 0 0; font-size: 1.15rem; }
.storage-destination-kicker { color: #75d7ff; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.storage-destination-breadcrumb { margin-top: .35rem; color: var(--muted); font-size: .8rem; display:flex; align-items:center; flex-wrap:wrap; gap:.15rem; }
.storage-destination-breadcrumb-link { appearance:none; border:0; background:transparent; color:#85cfff; padding:0; font:inherit; cursor:pointer; text-decoration:underline; text-decoration-color:rgba(133,207,255,.35); text-underline-offset:2px; }
.storage-destination-breadcrumb-link:hover { color:#dff7ff; text-decoration-color:currentColor; }
.storage-destination-breadcrumb-current { color:#dff7ff; font-weight:650; }
.storage-destination-body { min-height: 0; display: grid; grid-template-columns: minmax(220px, 270px) 1fr; }
.storage-destination-info { padding: 1.4rem; border-right: 1px solid rgba(255,255,255,.08); background: rgba(3,18,30,.58); }
.storage-destination-info-orb { width: 96px; height: 96px; margin: .25rem auto 1rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(104,222,255,.32); color: #77dcff; font-size: 3rem; background: radial-gradient(circle, rgba(65,199,255,.22), rgba(5,35,56,.45) 60%, rgba(1,12,21,.2)); box-shadow: 0 0 42px rgba(33,183,255,.16); }
.storage-destination-current { margin: .55rem 0 1rem; word-break: break-word; color: #d9f5ff; font-size: .86rem; }
.storage-destination-space { min-width: 0; overflow: auto; padding: 1.35rem; }
.storage-destination-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; align-content: start; }
.storage-destination-node { position: relative; min-height: 148px; display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: .9rem; padding: 1rem; text-align: left; border: 1px solid rgba(117,215,255,.16); border-radius: 18px; color: inherit; background: linear-gradient(145deg, rgba(16,45,67,.72), rgba(4,20,33,.86)); box-shadow: 0 12px 28px rgba(0,0,0,.22); transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.storage-destination-node::after { content: ''; position: absolute; width: 46px; height: 1px; right: -24px; top: 50%; background: linear-gradient(90deg, rgba(74,222,255,.45), transparent); pointer-events: none; }
.storage-destination-node:hover { transform: translateY(-3px) scale(1.015); border-color: rgba(112,224,255,.55); box-shadow: 0 16px 34px rgba(0,0,0,.32), 0 0 24px rgba(49,192,255,.1); }
.storage-destination-node.selected { border-color: rgba(97,255,179,.55); }
.storage-destination-orb { width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #a9edff; font-size: 1.65rem; background: radial-gradient(circle at 35% 30%, rgba(123,237,255,.34), rgba(21,88,116,.55) 45%, rgba(5,25,41,.92) 70%); border: 1px solid rgba(130,232,255,.34); box-shadow: inset 0 0 20px rgba(88,221,255,.13), 0 0 20px rgba(50,190,255,.12); }
.storage-destination-orb img { width: 54%; height: 54%; object-fit: contain; }
.storage-destination-node-text { min-width: 0; display: grid; gap: .35rem; }
.storage-destination-node-text strong { overflow: hidden; text-overflow: ellipsis; }
.storage-destination-node-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.storage-destination-empty, .storage-destination-error { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; padding: 2rem; text-align: center; border: 1px dashed rgba(255,255,255,.12); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.02); }
.storage-destination-error { color: #ff9ba6; border-color: rgba(255,88,110,.28); }
.storage-destination-footer-actions { display: flex; gap: .7rem; }
@media (max-width: 760px) { .storage-destination-overlay { padding: 0; } .storage-destination-world { width: 100vw; height: 100vh; border-radius: 0; } .storage-destination-body { grid-template-columns: 1fr; } .storage-destination-info { display: none; } .storage-destination-grid { grid-template-columns: 1fr; } }
.resources-storage-header { display:grid; gap:.8rem; padding:.85rem 1rem; border:1px solid rgba(105,206,255,.13); border-radius:14px; background:linear-gradient(180deg,rgba(9,31,48,.72),rgba(5,19,31,.52)); box-shadow:inset 0 1px 0 rgba(255,255,255,.025); }
.resources-storage-header-actions { display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; }
.resources-storage-breadcrumb { display:flex; align-items:center; gap:.35rem; min-width:0; overflow:auto; white-space:nowrap; padding:.15rem .05rem .05rem; scrollbar-width:thin; }
.resources-storage-breadcrumb-link, .resources-storage-breadcrumb-current { font:inherit; font-size:.82rem; border:0; background:transparent; padding:.26rem .38rem; border-radius:7px; color:#9edcff; }
.resources-storage-breadcrumb-link { cursor:pointer; }
.resources-storage-breadcrumb-link:hover { background:rgba(93,197,255,.10); color:#dff7ff; }
.resources-storage-breadcrumb-current { color:#eefaff; font-weight:650; }
.resources-storage-breadcrumb-sep { color:#55758d; font-size:.9rem; }
.resources-storage-icon-button { width:36px; height:36px; display:inline-grid; place-items:center; border:1px solid rgba(112,215,255,.18); border-radius:10px; background:linear-gradient(180deg,rgba(14,48,68,.82),rgba(6,27,43,.78)); color:#9fe8ff; cursor:pointer; box-shadow:inset 0 1px 0 rgba(255,255,255,.025); transition:transform .12s ease,border-color .12s ease,background .12s ease; }
.resources-storage-icon-button:hover { transform:translateY(-1px); border-color:rgba(112,215,255,.48); background:linear-gradient(180deg,rgba(22,72,99,.92),rgba(9,38,59,.9)); }
.resources-storage-icon-button:disabled, .resources-storage-icon-button.is-busy { opacity:.45; cursor:progress; transform:none; }
.resources-storage-icon-button.danger { margin-left:auto; border-color:rgba(255,82,104,.45); color:#ff91a0; background:linear-gradient(180deg,rgba(92,18,34,.76),rgba(52,9,20,.78)); }
.resources-storage-icon-button.danger:hover { border-color:rgba(255,96,117,.78); background:linear-gradient(180deg,rgba(125,24,45,.86),rgba(71,10,26,.88)); }
.resources-storage-icon-button svg { width:19px; height:19px; display:block; }
.resources-storage-content { display:grid; gap:.7rem; }
.resources-storage-items { min-width:0; }
.resources-storage-items-icons { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.resources-storage-items-list { display:grid; grid-template-columns:1fr; gap:6px; }
.resources-storage-item { cursor:pointer; min-width:0; overflow:hidden; border:1px solid rgba(129,177,211,.10); background:linear-gradient(180deg,rgba(18,37,55,.78),rgba(14,29,44,.7)); }
.resources-storage-item-icons { min-height:142px; padding:12px; display:grid; grid-template-rows:auto auto 1fr; gap:8px; align-content:start; }
.resources-storage-item-list { min-height:54px; padding:8px 10px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:10px; align-items:center; }
.resources-storage-item-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.resources-storage-item-meta { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.resources-storage-folder-icon,.resources-storage-file-icon { color:#8bdcff; display:grid; place-items:center; }
.resources-storage-item-icons .resources-storage-folder-icon,.resources-storage-item-icons .resources-storage-file-icon { width:64px; height:64px; border-radius:16px; background:radial-gradient(circle at 35% 30%,rgba(107,220,255,.24),rgba(12,49,72,.12)); border:1px solid rgba(103,212,255,.12); }
.resources-storage-item-list .resources-storage-folder-icon,.resources-storage-item-list .resources-storage-file-icon { width:34px; height:34px; }
.resources-storage-folder-icon svg,.resources-storage-file-icon svg { width:56%; height:56%; }
.resources-storage-preview { width:100%; height:108px; object-fit:cover; border-radius:9px; border:1px solid rgba(255,255,255,.06); }
.resources-storage-item-list .resources-storage-preview { width:42px; height:42px; border-radius:7px; grid-row:auto; }
.resources-storage-item-list .resources-storage-item-meta { text-align:right; max-width:38vw; }
.resources-storage-sort { min-height:36px; border:1px solid rgba(112,215,255,.18); border-radius:10px; background:rgba(6,27,43,.82); color:#dff8ff; padding:0 .65rem; }
.resources-storage-icon-button.active { border-color:rgba(112,215,255,.65); box-shadow:0 0 0 2px rgba(89,205,255,.10) inset; }
.resources-storage-item.selected { border-color:rgba(75,190,255,.78); background:linear-gradient(180deg,rgba(27,84,119,.92),rgba(13,46,72,.92)); box-shadow:0 0 0 2px rgba(65,190,255,.18) inset; }
.resources-storage-items:focus { outline:none; }
.resources-storage-items-details { display:grid; grid-template-columns:1fr; gap:0; border:1px solid rgba(129,177,211,.13); border-radius:10px; overflow:auto; }
.resources-storage-details-header,.resources-storage-item-details { min-width:760px; display:grid; grid-template-columns:minmax(260px,2.2fr) minmax(160px,1fr) minmax(160px,1fr) minmax(110px,.7fr) minmax(160px,1fr); align-items:center; }
.resources-storage-details-header { position:sticky; top:0; z-index:2; background:#0c2031; color:#9fd9f4; font-size:.78rem; font-weight:700; border-bottom:1px solid rgba(129,177,211,.18); }
.resources-storage-details-header > span,.resources-storage-item-details > span { padding:8px 10px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.resources-storage-item-details { min-height:42px; border:0; border-bottom:1px solid rgba(129,177,211,.08); border-radius:0; }
.resources-storage-details-name { display:flex; align-items:center; gap:8px; min-width:0; padding:5px 10px; }
.resources-storage-details-name .resources-storage-folder-icon,.resources-storage-details-name .resources-storage-file-icon { width:28px; height:28px; flex:0 0 auto; }
.resources-storage-details-cell { color:#b7c9d6; font-size:.78rem; }
.storage-context-summary { padding:7px 10px; color:#8fc9e6; font-size:.76rem; border-bottom:1px solid rgba(255,255,255,.08); }
.storage-world-dialog-overlay { position:fixed; inset:0; z-index:2600; display:grid; place-items:center; padding:24px; background:rgba(2,9,18,.78); backdrop-filter:blur(5px); }
.storage-world-dialog { position:relative; isolation:isolate; width:min(470px,92vw); overflow:hidden; border:1px solid rgba(111,214,255,.22); border-radius:18px; background:radial-gradient(circle at 75% 20%,rgba(35,129,173,.16),transparent 38%),#071522; box-shadow:0 28px 80px rgba(0,0,0,.52); }
.storage-world-dialog-header,.storage-world-dialog-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.1rem; background:rgba(4,15,27,.78); }
.storage-world-dialog-header { border-bottom:1px solid rgba(255,255,255,.08); }
.storage-world-dialog-footer { border-top:1px solid rgba(255,255,255,.08); justify-content:flex-end; }
.storage-world-dialog-header h3 { margin:.15rem 0 0; }
.storage-world-dialog-body { padding:1.1rem; display:grid; gap:.8rem; }
.storage-world-dialog-message { margin:0; color:var(--muted); }
.storage-world-dialog-input { width:100%; min-height:42px; border-radius:10px; border:1px solid rgba(117,215,255,.18); background:rgba(2,15,27,.72); color:inherit; padding:.65rem .75rem; outline:none; }
.storage-world-dialog-input:focus { border-color:rgba(117,215,255,.55); box-shadow:0 0 0 3px rgba(76,188,245,.08); }
.inline-controls.wrap { flex-wrap: wrap; }
@media (max-width: 1200px) {
  .storage-layout-unified { grid-template-columns: 1fr; }
}

/* ── Storage/database tree UX buildfix4 ─────────────────────── */
.database-node-row.selected {
  background: rgba(69,163,255,.14) !important;
  box-shadow: inset 3px 0 0 rgba(69,163,255,.85);
}
.database-db > summary.database-node-row,
.database-schema > summary.database-node-row {
  user-select: none;
}
.database-db > summary.database-node-row { padding-left: .6rem; }
.database-schema { margin-left: 1rem; }
.database-schema > summary.database-node-row { padding-left: .45rem; }
.database-table-list { padding-left: 1.65rem; }
.database-tree-table.database-node-row { user-select: none; }
.database-context-menu { min-width: 210px; }
.database-transfer-card { width: min(980px, 92vw); }
.database-transfer-tree {
  min-height: 360px;
  max-height: 52vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .45rem;
  background: rgba(5,14,24,.45);
}
.database-transfer-database { border-bottom: 1px solid rgba(88,116,148,.15); }
.database-transfer-database > summary { list-style: none; }
.database-transfer-database > summary::-webkit-details-marker { display: none; }
.database-transfer-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: transparent;
  color: var(--text);
  padding: .55rem .65rem;
  text-align: left;
  cursor: pointer;
}
.database-transfer-row:hover { background: rgba(69,163,255,.07); }
.database-transfer-row.active-target { border-color: rgba(70,214,165,.45); background: rgba(70,214,165,.08); }
.database-transfer-schemas { display: grid; gap: .2rem; padding: .2rem 0 .45rem 1.4rem; }
.database-transfer-schema { justify-content: flex-start; }
.database-transfer-current { margin: .5rem 0; font-weight: 600; }
.database-transfer-options { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .8rem; }

/* ── Database fleet tree v3 ─────────────────────────────────── */
.database-project,
.database-instance,
.database-db,
.database-schema,
.database-category {
  display: block;
  margin: 0;
  padding: 0;
}
.database-project > summary,
.database-instance > summary,
.database-db > summary,
.database-schema > summary,
.database-category > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-height: 34px;
  padding: .34rem .48rem;
  border-radius: 9px;
  cursor: default;
}
.database-project > summary::-webkit-details-marker,
.database-instance > summary::-webkit-details-marker,
.database-db > summary::-webkit-details-marker,
.database-schema > summary::-webkit-details-marker,
.database-category > summary::-webkit-details-marker { display: none; }
.database-project > summary::before,
.database-instance > summary::before,
.database-db > summary::before,
.database-schema > summary::before,
.database-category > summary::before {
  content: '›';
  width: 14px;
  flex: 0 0 14px;
  transform-origin: center;
  opacity: .75;
}
.database-project[open] > summary::before,
.database-instance[open] > summary::before,
.database-db[open] > summary::before,
.database-schema[open] > summary::before,
.database-category[open] > summary::before { transform: rotate(90deg); }
.database-project > .database-tree-children { padding-left: 18px; }
.database-instance > .database-tree-children { padding-left: 18px; }
.database-db > .database-tree-children { padding-left: 18px; }
.database-schema > .database-tree-children { padding-left: 18px; }
.database-category > .database-tree-children { padding-left: 18px; }
.database-tree-children {
  border-left: 1px dotted rgba(141,164,196,.16);
  margin-left: 9px;
}
.database-fleet-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .55rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  padding: .34rem .46rem;
  border-radius: 8px;
  text-align: left;
}
.database-fleet-row:hover,
.database-project > summary:hover,
.database-instance > summary:hover,
.database-db > summary:hover,
.database-schema > summary:hover,
.database-category > summary:hover { background: rgba(255,255,255,.035); }
.database-fleet-row.selected,
.database-node-row.selected { border-color: rgba(86,156,255,.55); background: rgba(86,156,255,.11); }
.database-fleet-primary { min-width: 0; display: flex; align-items: center; gap: .42rem; }
.database-fleet-primary > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.database-fleet-meta { font-size: .72rem; opacity: .65; white-space: nowrap; }
.database-fleet-error { margin: .3rem .3rem .5rem 1.4rem; color: #ff8c9b; font-size: .78rem; }
.database-fleet-detail { display: grid; gap: .7rem; min-height: 240px; }
.database-fleet-detail .source-content { max-height: 65vh; min-height: 220px; overflow: auto; white-space: pre-wrap; }
.database-fleet-copy-grid { display: grid; grid-template-columns: minmax(420px,1.2fr) minmax(280px,.8fr); gap: 1rem; }
.database-fleet-copy-options { display: grid; align-content: start; gap: .65rem; }
.database-copy-progress { display: grid; gap: .25rem; padding: .75rem; border: 1px solid rgba(86,156,255,.22); border-radius: 10px; background: rgba(86,156,255,.06); }
.database-instance-current > summary { background: rgba(70,196,139,.055); }
.database-database-current > summary { background: rgba(70,196,139,.075); }
.database-readonly-chip { font-size: .67rem; padding: .12rem .38rem; border-radius: 999px; border: 1px solid rgba(150,170,200,.25); opacity: .8; }
@media (max-width: 1100px) { .database-fleet-copy-grid { grid-template-columns: 1fr; } }

/* ── Cloud architecture / containers / secrets / resources ───────────── */
.database-project > summary,
.database-instance > summary,
.database-db > summary,
.database-schema > summary,
.database-category > summary,
.resource-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.database-tree-head strong,
.resource-detail-head h3,
.section-heading h2 { text-align: left; }
.resource-layout { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(480px, 1.45fr); gap: 1rem; }
.resource-tree-panel, .resource-detail-panel { min-height: 68vh; }
.resource-detail-head { display: grid; gap: .35rem; padding-bottom: .85rem; border-bottom: 1px solid var(--border); margin-bottom: .85rem; }
.resource-row.selected { border-color: rgba(86,156,255,.55); background: rgba(86,156,255,.12); }
.resource-cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; margin-bottom: .9rem; }
.resource-card { display: grid; gap: .65rem; padding: .95rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(8,20,40,.38); margin-bottom: .9rem; }
.resource-card h4 { margin: 0; }
.resource-card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.infra-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.inline-pre, .source-content.compact { margin: 0; white-space: pre-wrap; word-break: break-word; }
.resource-link-groups { display: grid; gap: .85rem; }
.resource-link-group { display: grid; gap: .45rem; }
.resource-link-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.resource-link-pill { border: 1px solid rgba(119,162,255,.25); background: rgba(119,162,255,.08); color: var(--text); border-radius: 999px; padding: .35rem .7rem; cursor: pointer; }
.resource-link-pill:hover { background: rgba(119,162,255,.16); }
.resources-layout { display: grid; grid-template-columns: minmax(620px,1.45fr) minmax(300px,.8fr); gap: 1rem; }
.resources-graph-panel, .resources-side-panel { min-height: 72vh; }
.resources-graph-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .9rem; }
.resources-graph-canvas-wrap { position: relative; min-height: 62vh; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: radial-gradient(circle at top, rgba(35,72,126,.35), rgba(5,12,24,.95)); }
#resources-graph-canvas { width: 100%; height: 62vh; display: block; }
#resources-graph-empty { position: absolute; inset: 0; }
.resource-errors { display: grid; gap: .4rem; margin-bottom: .8rem; }
@media (max-width: 1180px) {
  .resource-layout, .resources-layout, .resource-cards-grid { grid-template-columns: 1fr; }
}

/* ── Recursos 3D / modo primeira pessoa ───────────────────── */
body.resources-mode { overflow: hidden; }
body.resources-mode .main-content { height: 100vh; padding: 0; overflow: hidden; }
body.resources-mode .main-content > .topbar,
body.resources-mode .main-content > #global-operation-status { display: none !important; }
body.resources-mode #view-resources { display: block; width: 100%; height: 100vh; margin: 0; padding: 0; }
body.resources-mode #view-resources .section-heading,
body.resources-mode #view-resources .resources-layout,
body.resources-mode #view-resources .resources-side-panel,
body.resources-mode #view-resources .resources-graph-toolbar { display: none !important; }
.resources-scene-shell { position: relative; width: 100%; height: 100%; min-height: 100vh; overflow: hidden; background: #07172b; }
#resources-graph-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 100%; outline: none; cursor: crosshair; }
#resources-graph-canvas.resources-look-mode { cursor: grabbing; }
.resources-scene-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .45rem; color: var(--muted); background: rgba(7,23,43,.82); z-index: 5; }
.resources-scene-empty[hidden] { display: none !important; }
.resources-hud { position: absolute; z-index: 12; color: var(--text); background: rgba(5,15,29,.72); border: 1px solid rgba(111,161,218,.28); box-shadow: 0 14px 42px rgba(0,0,0,.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: .85rem; }
.resources-hud-top-left { top: 14px; left: 14px; max-width: min(56vw, 700px); padding: .7rem .8rem; }
.resources-hud-top-right { top: 14px; right: 14px; padding: .45rem; }
.resources-hud-title { font-weight: 800; font-size: .92rem; margin-bottom: .25rem; }
.resources-hud-help { color: var(--muted); font-size: .72rem; line-height: 1.35; margin-bottom: .5rem; }
.resources-scene-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.resources-scene-actions .button { background: rgba(8,22,40,.80); }
.resources-overlay { position: absolute; z-index: 20; width: min(430px, calc(100vw - 32px)); max-height: min(76vh, 720px); overflow: auto; color: var(--text); background: rgba(7,18,33,.92); border: 1px solid rgba(111,161,218,.35); border-radius: 1rem; box-shadow: 0 22px 70px rgba(0,0,0,.48); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 1rem; }
.resources-overlay[hidden] { display: none !important; }
.resources-detail-overlay { top: 82px; right: 14px; }
.resources-alert-overlay { top: 82px; right: 14px; }
.resources-overlay-close { position: sticky; float: right; top: 0; width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(4,14,28,.88); color: var(--text); font-size: 1.2rem; line-height: 1; z-index: 2; }
.resources-overlay-kicker { color: var(--muted); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }
.resources-overlay h3 { margin: 0 2.4rem .3rem 0; }
.resources-description { margin: .65rem 0; padding: .65rem .7rem; border-left: 3px solid var(--accent); background: rgba(69,163,255,.08); white-space: pre-wrap; line-height: 1.45; }
.resources-overlay-content { margin: .7rem 0 0; padding: .7rem; background: rgba(2,10,20,.72); border: 1px solid rgba(111,161,218,.18); border-radius: .7rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .76rem; line-height: 1.45; }
#view-resources:fullscreen,
#view-resources:-webkit-full-screen { width: 100vw; height: 100vh; background: #07172b; }
#view-resources:fullscreen .resources-scene-shell,
#view-resources:-webkit-full-screen .resources-scene-shell { width: 100vw; height: 100vh; min-height: 100vh; }
@media (max-width: 760px) {
  body.resources-mode .app-shell { display: block; }
  body.resources-mode .sidebar { display: none; }
  body.resources-mode .main-content { width: 100vw; }
  .resources-hud-top-left { max-width: calc(100vw - 28px); right: 14px; }
  .resources-hud-help { display: none; }
  .resources-hud-top-right { top: auto; bottom: 14px; left: 14px; right: 14px; justify-content: center; }
  .resources-detail-overlay, .resources-alert-overlay { top: 76px; left: 14px; right: 14px; width: auto; }
}

/* buildfix16 — seleção e explorador 3D de bancos/schemas */
.resources-selection-hud {
  position: absolute; left: 14px; bottom: 14px; z-index: 22;
  width: min(620px, calc(100% - 28px)); padding: .72rem .85rem;
  border: 1px solid rgba(111,161,218,.28); border-radius: .9rem;
  background: rgba(5,16,31,.82); color: var(--text); backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0,0,0,.34); pointer-events: none;
}
.resources-selection-hud > strong { display: block; margin-bottom: .18rem; }
.resources-selection-hud > span { color: var(--muted); font-size: .72rem; }
.resources-selection-list { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .48rem; max-height: 72px; overflow: hidden; }
.resources-selection-pill { display: inline-flex; align-items: center; padding: .22rem .5rem; border-radius: 999px; font-size: .7rem; color: #eaf4ff; background: rgba(83,141,217,.18); border: 1px solid rgba(119,174,245,.22); }
.resources-hover-tooltip {
  position: absolute; z-index: 34; transform: translate(-50%, calc(-100% - 12px));
  opacity: 0; pointer-events: none; padding: .42rem .6rem; border-radius: .62rem;
  color: #f5f9ff; background: rgba(4,14,28,.94); border: 1px solid rgba(137,188,255,.30);
  box-shadow: 0 10px 28px rgba(0,0,0,.36); font-size: .76rem; white-space: nowrap;
  transition: opacity .12s ease;
}
.resources-hover-tooltip.visible { opacity: 1; }
.resources-explorer-layer { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.resources-db-window {
  position: absolute; width: min(470px, calc(100% - 28px)); min-width: 320px; min-height: 220px; max-width: calc(100% - var(--resources-window-left-inset, 8px) - 8px); max-height: calc(100% - 16px);
  display: flex; flex-direction: column; overflow: hidden; resize: both; pointer-events: auto;
  color: var(--text); background: rgba(5,16,31,.96); border: 1px solid rgba(121,174,245,.30);
  border-radius: 1rem; box-shadow: 0 24px 76px rgba(0,0,0,.52); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .18s ease, transform .18s ease;
}
.resources-db-window.resources-db-window-wide { width: min(980px, calc(100% - var(--resources-window-left-inset, 8px) - 8px)); height: min(76vh, 760px); }
.resources-db-window.resources-db-window-maximized { top: 8px !important; right: 8px !important; bottom: 8px !important; left: var(--resources-window-left-inset, 8px) !important; width: auto !important; height: auto !important; max-width: none; max-height: none; resize: none; border-radius: .8rem; }
.resources-db-window.resources-db-window-minimized { display: none; }
.resources-db-window.show { opacity: 1; transform: translateY(0) scale(1); }
.resources-db-window.fade-out { opacity: 0; transform: translateY(12px) scale(.98); }
.resources-db-window-header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .65rem .75rem .65rem .85rem; background: rgba(11,29,54,.96); border-bottom: 1px solid rgba(121,174,245,.18); cursor: move; user-select: none; }
.resources-db-window-title { min-width: 0; flex: 1; }
.resources-db-window-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resources-db-window-title span { display: block; margin-top: .1rem; color: var(--muted); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resources-db-window-controls { display: flex; align-items: center; gap: .3rem; flex: 0 0 auto; }
.resources-db-window-control { width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.resources-db-window-control:hover { background: rgba(121,174,245,.14); border-color: rgba(121,174,245,.35); }
.resources-db-window-body { padding: .8rem; overflow: auto; display: grid; gap: .7rem; min-height: 0; }
.resources-db-window-section { padding: .65rem .7rem; border: 1px solid rgba(121,174,245,.14); border-radius: .75rem; background: rgba(255,255,255,.025); }
.resources-db-window-section h4 { margin: 0 0 .5rem; font-size: .82rem; text-transform: capitalize; }
.resources-db-window-list { display: grid; gap: .35rem; }
.resources-db-window-item { padding: .4rem .5rem; border-radius: .55rem; font-size: .76rem; background: rgba(255,255,255,.035); border: 1px solid rgba(121,174,245,.08); }
.sea-resource-selector { display: grid; gap: .55rem; }
.sea-resource-group { border: 1px solid rgba(121,174,245,.16); border-radius: .75rem; background: rgba(255,255,255,.022); overflow: hidden; }
.sea-resource-group.level-1 { margin: .35rem .4rem; background: rgba(31,65,99,.18); }
.sea-resource-group.level-2 { margin: .3rem .45rem; background: rgba(31,65,99,.11); }
.sea-resource-header { min-height: 58px; display: grid; grid-template-columns: 54px 1fr 34px; align-items: center; gap: .5rem; padding: .3rem .45rem; background: rgba(14,38,65,.78); border-bottom: 1px solid rgba(121,174,245,.12); }
.sea-resource-group.collapsed > .sea-resource-content { display: none; }
.sea-resource-title { min-width: 0; display: grid; gap: .1rem; }
.sea-resource-title strong { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sea-resource-count { color: #8eb1d1; font: 700 .68rem ui-monospace,monospace; }
.sea-collapse { width: 30px; height: 30px; border-radius: .5rem; border: 1px solid rgba(121,174,245,.16); background: rgba(255,255,255,.035); color: #cfe6ff; cursor: pointer; }
.sea-resource-content { display: grid; gap: .28rem; padding: .25rem; }
.sea-resource-item { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: .45rem; padding: .3rem .45rem; border-radius: .5rem; background: rgba(255,255,255,.022); font-size: .72rem; }
.sea-resource-item:hover { background: rgba(86,153,231,.08); }
.sea-resource-item.unselected { opacity: .58; }
.sea-resource-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sea-resource-size { color: #7f9db8; font: 600 .65rem ui-monospace,monospace; white-space: nowrap; }
.sea-live-mesh-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; background: transparent; border-radius: inherit; }
.sea-live-mesh-slot { position: relative; isolation: isolate; overflow: hidden; }
.sea-mesh-toggle, .sea-item-mesh-toggle { padding: 0; border: 1px solid rgba(121,174,245,.18); background: rgba(3,17,30,.64); overflow: hidden; cursor: pointer; }
.sea-mesh-toggle { width: 50px; height: 50px; border-radius: .65rem; }
.sea-item-mesh-toggle { width: 34px; height: 34px; border-radius: .52rem; }
.sea-mesh-toggle:hover, .sea-item-mesh-toggle:hover { border-color: rgba(121,200,255,.65); box-shadow: 0 0 18px rgba(74,171,255,.15); }
.sea-item-mesh-toggle[data-state='none'] { background: rgba(225,235,245,.08); border-color: rgba(225,235,245,.24); }
.sea-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: .2rem; }
.sea-action-card { min-height: 116px; border: 1px solid rgba(121,174,245,.24); border-radius: .8rem; background: linear-gradient(180deg,rgba(22,55,90,.72),rgba(7,25,43,.92)); color: #eaf5ff; display: grid; place-items: center; align-content: center; gap: .25rem; font-weight: 800; cursor: pointer; }
.sea-action-card:disabled { opacity: .42; cursor: not-allowed; }
.sea-action-mesh { display: block; width: 72px; height: 72px; border-radius: .7rem; pointer-events: none; }
.sea-action-card:hover { border-color: rgba(121,200,255,.58); box-shadow: inset 0 0 22px rgba(70,163,255,.06), 0 8px 26px rgba(0,0,0,.22); }
.world-choice-open { overflow: hidden !important; }
.world-choice-modal { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 1rem; background: rgba(1,8,17,.72); backdrop-filter: blur(9px) saturate(.82); -webkit-backdrop-filter: blur(9px) saturate(.82); }
.world-choice-card { width: min(560px, calc(100vw - 32px)); display: grid; gap: .9rem; padding: 1.15rem; color: var(--text); background: linear-gradient(180deg, rgba(10,28,49,.98), rgba(5,17,31,.99)); border: 1px solid rgba(111,161,218,.38); border-radius: 1rem; box-shadow: 0 26px 90px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.035); }
.world-choice-kicker { color: #86a9ca; font-size: .67rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.world-choice-card h2 { margin: -.15rem 0 0; font-size: 1.12rem; }
.world-choice-description { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.48; }
.world-choice-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.world-choice-option { min-height: 112px; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: .65rem; padding: .8rem; text-align: left; color: var(--text); background: rgba(9,30,51,.88); border: 1px solid rgba(111,161,218,.23); border-radius: .8rem; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.world-choice-option:hover, .world-choice-option:focus-visible { transform: translateY(-1px); border-color: rgba(107,201,255,.7); background: rgba(18,49,80,.96); outline: none; }
.world-choice-option.is-default { border-color: rgba(86,202,162,.46); box-shadow: inset 0 0 0 1px rgba(86,202,162,.08); }
.world-choice-option-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: .65rem; background: rgba(92,155,222,.12); color: #95d9ff; font-size: 1.45rem; }
.world-choice-option strong, .world-choice-option small { display: block; }
.world-choice-option strong { margin-bottom: .18rem; font-size: .82rem; }
.world-choice-option small { color: #88a6c2; font-size: .68rem; line-height: 1.35; }
.world-choice-hint { color: #718ca6; font-size: .65rem; text-align: center; }
@media (max-width:720px) { .sea-action-grid, .world-choice-options { grid-template-columns: 1fr; } .sea-resource-size { display:none; } }
@media (max-width:720px) { .sea-action-grid { grid-template-columns: 1fr; } .sea-resource-size { display:none; } }
.resources-db-table-wrap { overflow: auto; max-height: 54vh; border: 1px solid rgba(121,174,245,.12); border-radius: .65rem; }
.resources-db-window-maximized .resources-db-table-wrap { max-height: 68vh; }
.resources-db-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: .74rem; table-layout: auto; }
.resources-db-table th { position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap; padding: .5rem .55rem; background: #0d2540; color: #cfe5ff; border-bottom: 1px solid rgba(121,174,245,.2); }
.resources-db-table td { padding: .45rem .55rem; vertical-align: top; border-bottom: 1px solid rgba(121,174,245,.08); border-right: 1px solid rgba(121,174,245,.05); max-width: 300px; }
.resources-db-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.018); }
.resources-db-table tbody tr:hover td { background: rgba(73,142,235,.08); }
.resources-db-table code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .72rem; color: #e8f3ff; }
.resources-db-cell-truncated { max-height: 5.2em; overflow: hidden; position: relative; }
.resources-db-cell-truncated::after { content: ''; position: absolute; right: 0; bottom: 0; width: 34%; height: 1.35em; background: linear-gradient(90deg, transparent, rgba(5,16,31,.98)); pointer-events: none; }
.resources-db-pager { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .65rem; }
.resources-db-pager .small { text-align: center; flex: 1; }
.resources-window-dock { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 500; display: grid; gap: .45rem; pointer-events: auto; }
.resources-window-dock-item { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; border: 1px solid rgba(121,174,245,.38); background: rgba(8,27,49,.96); color: #d9ecff; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; font-size: .68rem; font-weight: 800; }
.resources-window-dock-item:hover { transform: scale(1.07); background: rgba(30,73,116,.98); }
.resources-db-denied { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; color: #ffb2b2; animation: resources-denied-pulse .55s ease-in-out 2; }
.resources-db-denied .icon { font-size: 2.2rem; }
.resources-db-denied strong { color: #ff7474; font-size: 1.05rem; }
@keyframes resources-denied-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.025); opacity: .78; } }

/* ── Tokens de acesso / API de tools ───────────────────────────── */
.token-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:.9rem; }
.token-page-head h2 { font-size:1.25rem; margin-bottom:.35rem; }
.token-page-head p { max-width:780px; margin-bottom:0; }
.token-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.85rem; margin-bottom:.9rem; }
.token-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(340px,.8fr); gap:.9rem; margin-bottom:.9rem; }
.token-list-panel, .token-audit-panel { min-height:360px; }
.token-list { display:grid; gap:.65rem; }
.token-empty { min-height:240px; display:grid; place-content:center; text-align:center; gap:.35rem; color:var(--muted); }
.token-card { border:1px solid var(--border); border-radius:.85rem; background:#091522; padding:.8rem; display:grid; gap:.65rem; }
.token-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; }
.token-card-head > div { display:grid; gap:.25rem; }
.token-card-head code { color:var(--muted); font-size:.75rem; }
.token-status { display:inline-flex; align-items:center; border-radius:999px; padding:.25rem .52rem; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; border:1px solid var(--border); }
.token-status.ativo { color:#b2f1d8; background:rgba(107,217,177,.08); border-color:rgba(107,217,177,.38); }
.token-status.revogado, .token-status.expirado { color:#ffb4c0; background:rgba(255,102,125,.08); border-color:rgba(255,102,125,.38); }
.token-card-meta { display:flex; flex-wrap:wrap; gap:.4rem; }
.token-card-meta span { font-size:.72rem; color:#c5d2e2; padding:.24rem .45rem; border:1px solid rgba(36,53,74,.9); border-radius:999px; background:rgba(255,255,255,.02); }
.token-card-times { display:flex; justify-content:space-between; gap:.8rem; flex-wrap:wrap; }
.token-card-actions { display:flex; gap:.4rem; flex-wrap:wrap; }
.token-audit-list { display:grid; gap:.55rem; max-height:590px; overflow:auto; }
.token-call { border:1px solid var(--border); border-radius:.7rem; background:#08131f; overflow:hidden; }
.token-call.success { border-left:3px solid var(--accent-2); }
.token-call.failure { border-left:3px solid var(--danger); }
.token-call summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.65rem .7rem; color:var(--muted); font-size:.78rem; }
.token-call summary::-webkit-details-marker { display:none; }
.token-call summary span:first-child { display:grid; gap:.16rem; }
.token-call summary strong { color:var(--text); }
.token-call summary small { color:var(--muted); }
.token-call-body { border-top:1px solid var(--border); padding:.7rem; display:grid; gap:.55rem; font-size:.78rem; }
.token-call-body > div { display:grid; grid-template-columns:80px minmax(0,1fr); gap:.5rem; }
.token-call-body pre { margin:0; max-height:230px; overflow:auto; white-space:pre-wrap; background:#06101b; border:1px solid var(--border); border-radius:.55rem; padding:.6rem; }
.token-error-text { color:#ffb4c0; }
.token-tools-panel { margin-bottom:.9rem; }
.token-tools-heading { align-items:flex-start; }
.token-tool-search { width:min(320px,100%); }
.token-endpoint-strip { display:grid; grid-template-columns:max-content minmax(160px,1fr); gap:.4rem .75rem; padding:.75rem; margin-bottom:.75rem; border:1px solid var(--border); border-radius:.7rem; background:#08131f; font-size:.78rem; }
.token-endpoint-strip code { color:#a9d5ff; }
.token-endpoint-strip span { color:var(--muted); }
.token-tools-catalog { display:grid; gap:.45rem; }
.token-tool-row { border:1px solid var(--border); border-radius:.7rem; background:#091522; overflow:hidden; }
.token-tool-row summary { cursor:pointer; list-style:none; display:grid; grid-template-columns:minmax(220px,.55fr) minmax(0,1fr); gap:.75rem; align-items:center; padding:.65rem .75rem; }
.token-tool-row summary::-webkit-details-marker { display:none; }
.token-tool-name { display:flex; align-items:center; gap:.45rem; min-width:0; }
.token-tool-name code { color:#d9eaff; overflow-wrap:anywhere; }
.token-tool-description { color:var(--muted); font-size:.78rem; }
.token-tool-detail { display:grid; gap:.65rem; padding:.75rem; border-top:1px solid var(--border); background:#07121e; }
.token-tool-detail > div { display:grid; gap:.25rem; }
.token-tool-detail strong { font-size:.75rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.token-tool-detail pre { margin:0; max-height:280px; overflow:auto; padding:.65rem; border:1px solid var(--border); border-radius:.55rem; background:#06101b; white-space:pre-wrap; }
.token-editor-card { width:min(97vw,1280px) !important; height:min(94vh,980px) !important; max-height:94vh !important; overflow:hidden; }
.token-editor-card > .modal-header,
.token-editor-card > .modal-footer { flex:0 0 auto; position:relative; z-index:2; background:var(--panel); }
.token-editor-card > .modal-header { padding:.85rem 1rem; }
.token-editor-card > .modal-footer { padding:.8rem 1rem; align-items:center; }
.token-editor-card > .modal-footer #token-editor-status { margin-right:auto; }
.token-editor-body { display:grid; gap:1rem; min-height:0; overflow:auto !important; overscroll-behavior:contain; padding:1rem !important; }
.token-form-grid { display:grid; grid-template-columns:minmax(280px,1.5fr) repeat(3,minmax(170px,.55fr)); gap:.8rem; }
.token-form-grid label { display:grid; gap:.35rem; }
.token-editor-section { border:1px solid var(--border); border-radius:.9rem; background:#08131f; overflow:visible; }
.token-editor-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; padding:.85rem .95rem; border-bottom:1px solid var(--border); }
.token-editor-section-head h3 { margin:0 0 .25rem; font-size:.95rem; }
.token-editor-section-head p { margin:0; line-height:1.45; }
.token-permission-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; padding:.75rem; max-height:none; overflow:visible; }
.token-tool-check { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.6rem; align-items:flex-start; padding:.65rem; border:1px solid rgba(36,53,74,.75); border-radius:.65rem; background:rgba(255,255,255,.015); }
.token-tool-check.mutation { border-color:rgba(240,189,91,.25); }
.token-tool-check input { width:auto; margin-top:.2rem; }
.token-tool-check > span:nth-child(2) { display:grid; gap:.18rem; }
.token-tool-check strong { color:var(--text); font-family:ui-monospace,monospace; font-size:.8rem; }
.token-tool-check small { color:var(--muted); line-height:1.35; }
.token-editor-resources-section { overflow:visible; }
.token-sea-list { display:grid; gap:.8rem; padding:.8rem; }
.token-sea-group { border:1px solid rgba(67,100,137,.85); border-radius:.85rem; overflow:hidden; background:#091725; }
.token-sea-group.has-selection { border-color:rgba(86,178,255,.72); box-shadow:0 0 0 1px rgba(86,178,255,.08) inset; }
.token-sea-summary { list-style:none; cursor:pointer; display:grid; grid-template-columns:46px minmax(0,1fr) auto 28px; gap:.8rem; align-items:center; min-height:68px; padding:.65rem .8rem; background:#0c1d2e; user-select:none; }
.token-sea-summary::-webkit-details-marker { display:none; }
.token-sea-provider-icon { width:42px; height:42px; display:grid; place-items:center; border:1px solid rgba(90,124,158,.5); border-radius:.7rem; background:#071522; }
.token-sea-provider-icon img { width:34px; height:34px; object-fit:contain; }
.token-sea-title { display:grid; gap:.15rem; min-width:0; }
.token-sea-title strong { font-size:.92rem; color:#edf7ff; overflow-wrap:anywhere; }
.token-sea-title small { color:var(--muted); }
.token-sea-selected { white-space:nowrap; font-size:.78rem; color:#9fc8eb; border:1px solid rgba(82,126,166,.5); border-radius:999px; padding:.3rem .55rem; background:#081725; }
.token-sea-chevron { font-size:1.2rem; color:var(--muted); transform:rotate(-90deg); transition:transform .16s ease; }
.token-sea-group[open] .token-sea-chevron { transform:rotate(0deg); }
.token-sea-content { display:grid; gap:.9rem; padding:.8rem; border-top:1px solid rgba(50,78,105,.7); }
.token-sea-resource-section { display:grid; gap:.5rem; }
.token-sea-resource-section h4 { margin:0; display:flex; align-items:center; gap:.45rem; font-size:.82rem; color:#bcd7ef; }
.token-sea-resource-section h4 span { color:var(--muted); font-weight:500; }
.token-sea-resource-grid { display:grid; gap:.5rem; }
.token-resource-row { display:grid; grid-template-columns:46px minmax(0,1fr) minmax(190px,220px); gap:.8rem; align-items:center; min-height:64px; padding:.6rem .75rem; border:1px solid rgba(36,53,74,.72); border-radius:.7rem; background:rgba(255,255,255,.018); }
.token-resource-row:hover { border-color:rgba(85,142,194,.8); background:rgba(80,135,186,.05); }
.token-resource-copy { display:grid; gap:.18rem; min-width:0; }
.token-resource-copy strong { font-size:.84rem; overflow-wrap:anywhere; color:#edf7ff; }
.token-resource-copy small { color:var(--muted); line-height:1.3; }
.token-resource-permission { width:100%; min-height:44px; padding:.55rem .65rem; font-size:.82rem; }
.token-mesh-icon { width:42px; height:42px; display:grid; place-items:center; filter:drop-shadow(0 5px 8px rgba(0,0,0,.35)); }
.token-mesh-icon svg { width:38px; height:38px; stroke:rgba(235,247,255,.85); stroke-width:1.15; stroke-linejoin:round; }
.token-mesh-bucket svg { fill:#8c5b2d; }
.token-mesh-database svg { fill:#364fbe; }
.token-mesh-image svg { fill:#d7e7f3; stroke:#7fa0ba; }
.token-secret-card { width:min(92vw,760px) !important; }
.token-secret-box { padding:1rem; border:1px solid rgba(240,189,91,.4); border-radius:.75rem; background:rgba(240,189,91,.05); overflow:auto; }
.token-secret-box code { color:#ffe2a5; user-select:all; word-break:break-all; }
.token-curl-box { margin-top:1rem; display:grid; gap:.35rem; }
.token-curl-box pre { margin:0; padding:.75rem; border:1px solid var(--border); border-radius:.65rem; background:#06101b; white-space:pre-wrap; overflow-wrap:anywhere; }
.token-role-link { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.52rem .65rem; border:1px solid rgba(75,137,190,.45); border-radius:.65rem; background:rgba(68,139,199,.06); }
.token-role-link span { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; }
.token-role-link strong { color:#bfe2ff; }
.role-card { border-left:3px solid rgba(82,170,255,.7); }
.role-tool-groups { display:grid; gap:.72rem; padding:.8rem; }
.role-tool-group { border:1px solid rgba(47,75,104,.9); border-radius:.78rem; background:#091725; overflow:hidden; }
.role-tool-group > summary { display:flex; align-items:center; justify-content:space-between; padding:.68rem .8rem; cursor:pointer; color:#dcecff; }
.role-tool-group-head { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.7rem .8rem; border-bottom:1px solid rgba(47,75,104,.7); }
.role-tool-group-head > div:first-child { display:flex; align-items:baseline; gap:.55rem; }
.role-tool-group-head small { color:var(--muted); }
.role-tool-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; padding:.65rem; }
.role-split-toggle { display:grid; grid-template-columns:34px 16px 34px; align-items:center; border:1px solid #345571; border-radius:999px; overflow:hidden; background:#06131f; }
.role-split-toggle button { border:0; height:30px; color:#cde8ff; background:transparent; cursor:pointer; }
.role-split-toggle button:hover { background:rgba(82,170,255,.15); }
.role-split-toggle span { width:10px; height:10px; border-radius:50%; justify-self:center; border:1px solid #6182a0; }
.role-split-toggle span.empty { background:transparent; }
.role-split-toggle span.partial { background:linear-gradient(90deg,#64c7ff 50%,transparent 50%); }
.role-split-toggle span.full { background:#64c7ff; box-shadow:0 0 8px rgba(100,199,255,.5); }
.role-storage-volume { display:grid; gap:.55rem; padding:.72rem; border:1px solid rgba(47,75,104,.9); border-radius:.8rem; background:#091725; }
.role-storage-head { display:grid; grid-template-columns:minmax(220px,1fr) minmax(180px,220px) auto; gap:.7rem; align-items:end; }
.role-storage-head > div:first-child { display:grid; gap:.14rem; }
.role-storage-head small { color:var(--muted); }
.role-storage-head label { display:grid; gap:.25rem; font-size:.72rem; color:var(--muted); }
.role-storage-scope { display:grid; grid-template-columns:150px minmax(240px,1fr) 150px auto auto; gap:.5rem; align-items:center; padding:.5rem; border:1px solid rgba(51,78,105,.7); border-radius:.62rem; background:#07131f; }
.role-storage-scope input,.role-storage-scope select,.role-storage-head select { min-height:38px; }
.role-storage-path { min-width:0; display:grid; gap:.18rem; padding:.42rem .55rem; border:1px solid rgba(50,80,108,.72); border-radius:.5rem; background:#0a1927; }
.role-storage-path [data-display-path] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#dcecff; font-size:.83rem; }
.role-storage-path [data-tech-path] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#6f8aa1; font-size:.66rem; }
.role-infra-provider,.role-infra-region,.role-infra-project { border:1px solid rgba(47,75,104,.82); border-radius:.82rem; background:#081522; overflow:hidden; }
.role-infra-provider + .role-infra-provider { margin-top:.7rem; }
.role-infra-provider > summary,.role-infra-region > summary,.role-infra-project > summary { display:flex; align-items:center; justify-content:space-between; gap:.8rem; cursor:pointer; list-style:none; padding:.7rem .8rem; color:#dcecff; }
.role-infra-provider > summary { background:linear-gradient(180deg,rgba(36,91,130,.18),rgba(7,21,34,.2)); }
.role-infra-region > summary { background:rgba(255,255,255,.018); color:#c9e7ff; }
.role-infra-project > summary { color:#eef8ff; }
.role-infra-provider summary::-webkit-details-marker,.role-infra-region summary::-webkit-details-marker,.role-infra-project summary::-webkit-details-marker { display:none; }
.role-infra-provider summary span,.role-infra-region summary span,.role-infra-project summary code { color:var(--muted); font-size:.72rem; font-weight:500; }
.role-infra-level { display:grid; gap:.6rem; padding:.65rem; border-top:1px solid rgba(47,75,104,.55); }
.role-infra-project-body { display:grid; gap:.7rem; padding:.7rem; border-top:1px solid rgba(47,75,104,.5); }
.role-resource-type { display:grid; gap:.5rem; }
.role-resource-type h4 { margin:0; display:flex; align-items:center; gap:.45rem; font-size:.8rem; color:#a9cfe9; text-transform:uppercase; letter-spacing:.05em; }
.role-resource-type h4 span { color:var(--muted); font-size:.7rem; font-weight:500; }
.role-processes > summary { background:linear-gradient(180deg,rgba(91,62,146,.22),rgba(7,21,34,.2)); }
.role-process-card { display:grid; gap:.55rem; padding:.7rem; border:1px solid rgba(70,83,116,.75); border-radius:.72rem; background:#07131f; }
.role-process-head,.role-process-sql { display:flex; align-items:center; justify-content:space-between; gap:.8rem; }
.role-process-head > div,.role-process-sql > span { min-width:0; display:grid; gap:.14rem; }
.role-process-head small,.role-process-sql small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.role-process-procedures { display:grid; gap:.18rem; margin-top:.34rem; padding-left:.55rem; border-left:2px solid rgba(65,118,158,.45); }
.role-process-procedures span { color:#9ec4de; font-size:.72rem; line-height:1.35; white-space:normal; }
.role-process-execute { display:flex; align-items:center; gap:.45rem; padding:.38rem .55rem; border:1px solid rgba(68,106,139,.72); border-radius:.52rem; color:#dcecff; white-space:nowrap; }
.role-process-sql { margin-left:1.15rem; padding:.55rem .65rem; border-left:2px solid rgba(126,89,183,.7); background:rgba(126,89,183,.06); border-radius:.45rem; }
.role-process-sql select { min-width:170px; }
@media (max-width:1100px) { .role-tool-grid { grid-template-columns:1fr; } .role-storage-head,.role-storage-scope { grid-template-columns:1fr; } .role-process-head,.role-process-sql { align-items:stretch; flex-direction:column; } .role-process-sql { margin-left:0; } }

@media (max-width:1100px) {
  .token-layout { grid-template-columns:1fr; }
  .token-form-grid { grid-template-columns:1fr 1fr; }
  .token-permission-list { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .token-page-head { display:grid; }
  .token-metrics { grid-template-columns:1fr 1fr; }
  .token-form-grid { grid-template-columns:1fr; }
  .token-tool-row summary { grid-template-columns:1fr; }
  .token-resource-row { grid-template-columns:1fr; }
  .token-endpoint-strip { grid-template-columns:1fr; }
}
/* ── Fim Tokens de acesso ──────────────────────────────────────── */

/* ── Status persistente de cópia de databases ─────────────────── */
.resources-copy-status-dock {
  position: fixed;
  right: 1rem;
  top: 5.3rem;
  width: min(420px, calc(100vw - 2rem));
  max-height: calc(100vh - 7rem);
  overflow: auto;
  z-index: 125;
  display: grid;
  gap: .55rem;
  padding: .7rem;
  border: 1px solid rgba(82,170,255,.45);
  border-radius: .9rem;
  background: rgba(5,18,32,.94);
  box-shadow: 0 18px 48px rgba(0,0,0,.42);
  backdrop-filter: blur(10px);
}
.resources-copy-status-dock[hidden] { display:none; }
.resources-copy-status-heading { font-size:.78rem; font-weight:800; color:#d9edff; letter-spacing:.04em; text-transform:uppercase; }
.resources-copy-status-card { display:grid; gap:.42rem; padding:.62rem .68rem; border:1px solid #28435d; border-radius:.7rem; background:#091a2b; }
.resources-copy-status-card.status-completed { border-color:rgba(107,217,177,.58); }
.resources-copy-status-card.status-failed { border-color:rgba(255,102,125,.58); }
.resources-copy-status-card.status-clipboard { border-color:rgba(69,163,255,.58); }
.resources-copy-status-top { display:flex; justify-content:space-between; gap:.7rem; align-items:flex-start; }
.resources-copy-status-top strong { font-size:.8rem; line-height:1.35; overflow-wrap:anywhere; }
.resources-copy-status-top span { flex:0 0 auto; color:#a9c6df; font:700 .75rem ui-monospace,monospace; }
.resources-copy-status-track { height:8px; overflow:hidden; border-radius:999px; background:#04101b; border:1px solid rgba(89,128,162,.3); }
.resources-copy-status-fill { height:100%; min-width:2px; border-radius:inherit; background:linear-gradient(90deg,#3d83ff,#48d8ff); transition:width .28s ease; }
.status-completed .resources-copy-status-fill { background:linear-gradient(90deg,#46b98f,#70e0b7); }
.status-failed .resources-copy-status-fill { background:linear-gradient(90deg,#bc4059,#ff7086); }
.resources-copy-status-meta { color:#7893ac; font: .68rem ui-monospace,monospace; overflow-wrap:anywhere; }
.resources-copy-status-error { color:#ffb0bd; font-size:.72rem; line-height:1.35; overflow-wrap:anywhere; }
@media (max-width:760px) {
  .resources-copy-status-dock { top:auto; bottom:1rem; right:.75rem; width:calc(100vw - 1.5rem); max-height:44vh; }
}
/* ── Fim status de cópia ──────────────────────────────────────── */

/* ── Jobs globais ─────────────────────────────────────────────── */
.jobs-dock { position:fixed; right:1rem; bottom:1rem; z-index:9999; width:min(430px,calc(100vw - 2rem)); padding:.65rem; border:1px solid #2c5273; border-radius:1rem; background:rgba(5,18,32,.96); box-shadow:0 18px 48px rgba(0,0,0,.45); backdrop-filter:blur(10px); display:grid; gap:.55rem; }
.jobs-dock.is-minimized { width:auto; min-width:74px; grid-template-columns:auto 1fr; align-items:center; }
.jobs-dock.is-minimized .jobs-dock-list { display:none; }
.jobs-dock-toggle { border:0; background:transparent; color:#d9edff; font-weight:800; padding:.3rem .45rem; }
.jobs-dock-points { display:flex; gap:.38rem; flex-wrap:wrap; align-items:center; }
.job-point { width:13px; height:13px; border-radius:50%; border:1px solid rgba(255,255,255,.45); padding:0; box-shadow:0 0 0 0 rgba(69,163,255,.55); }
.job-point.state-running { background:#45a3ff; animation:jobPulseBlue 1.4s infinite; }
.job-point.state-success { background:#55d69f; animation:jobPulseGreen 1.2s 2; }
.job-point.state-error { background:#ff667d; animation:jobPulseRed 1s infinite; }
.job-point.state-muted { background:#8290a4; }
@keyframes jobPulseBlue { 0%{box-shadow:0 0 0 0 rgba(69,163,255,.6)} 70%{box-shadow:0 0 0 8px rgba(69,163,255,0)} 100%{box-shadow:0 0 0 0 rgba(69,163,255,0)} }
@keyframes jobPulseGreen { 0%{box-shadow:0 0 0 0 rgba(85,214,159,.5)} 70%{box-shadow:0 0 0 8px rgba(85,214,159,0)} 100%{box-shadow:0 0 0 0 rgba(85,214,159,0)} }
@keyframes jobPulseRed { 0%{box-shadow:0 0 0 0 rgba(255,102,125,.55)} 70%{box-shadow:0 0 0 8px rgba(255,102,125,0)} 100%{box-shadow:0 0 0 0 rgba(255,102,125,0)} }
.jobs-dock-list,.jobs-page-list { display:grid; gap:.5rem; max-height:46vh; overflow:auto; }
.job-row { display:grid; gap:.38rem; padding:.62rem .7rem; border:1px solid #29445f; border-radius:.72rem; background:#091a2b; }
.job-row.state-success { border-color:rgba(85,214,159,.5); }
.job-row.state-error { border-color:rgba(255,102,125,.55); }
.job-row-head { display:flex; justify-content:space-between; gap:.7rem; align-items:flex-start; }
.job-row-head strong { display:block; font-size:.82rem; }
.job-row-head small { display:block; margin-top:.16rem; color:#8ea8c0; }
.job-row-head time { color:#8ea8c0; font:700 .68rem ui-monospace,monospace; white-space:nowrap; }
.job-row-progress { position:relative; height:8px; overflow:hidden; border-radius:999px; background:#04101b; border:1px solid rgba(89,128,162,.3); }
.job-progress-block.root .job-row-progress { height:9px; }
.job-progress-block.overall .job-row-progress { height:7px; opacity:.92; }
.job-progress-block.detail .job-row-progress { height:6px; opacity:.86; }
.job-progress-block + .job-progress-block { margin-top:.14rem; }
.job-row-progress > span { display:block; height:100%; background:linear-gradient(90deg,#3d83ff,#48d8ff); transition:width .3s ease; }
.job-row-progress.indeterminate > span { width:38%; animation:jobIndeterminate 1.15s infinite ease-in-out; }
@keyframes jobIndeterminate { 0%{transform:translateX(-110%)} 100%{transform:translateX(300%)} }
.job-row.state-success .job-row-progress > span { background:linear-gradient(90deg,#46b98f,#70e0b7); }
.job-row.state-error .job-row-progress > span { background:linear-gradient(90deg,#bc4059,#ff7086); }
.job-row-meta { display:flex; justify-content:space-between; gap:.7rem; color:#7893ac; font-size:.7rem; }
.job-row-error { color:#ffb0bd; font-size:.72rem; line-height:1.35; overflow-wrap:anywhere; }
.overview-jobs-panel { margin-top:.9rem; }
@media (max-width:760px) { .jobs-dock { right:.75rem; bottom:.75rem; width:calc(100vw - 1.5rem); } }
/* ── Fim Jobs globais ─────────────────────────────────────────── */