/* HTML Desktop — barra de abas, área de trabalho, janelas e molduras. */
#app { position: fixed; inset: 0; display: grid; grid-template-rows: 50px minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); background: #232323; }

/* ---------- Barra superior ---------- */
.topbar {
  position: relative; z-index: 50; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px;
  background: rgb(12 14 18 / 92%); backdrop-filter: blur(18px) saturate(1.4); color: #e9ecf1;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
}
.tb-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; padding-right: 10px; margin-right: 4px; border-right: 1px solid rgb(255 255 255 / 9%); height: 26px; white-space: nowrap; color: #fff; }
.tb-home, .tb-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: #c5cad3; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.tb-home:hover, .tb-btn:hover:not(:disabled) { background: rgb(255 255 255 / 7%); color: #fff; }
.tb-home.active, .tb-btn.active { background: rgb(255 255 255 / 11%); color: #fff; border-color: rgb(255 255 255 / 10%); }
.tb-btn.active { background: var(--sz-blue); border-color: var(--sz-blue); }
.tb-btn:disabled { opacity: .4; cursor: default; }
.tb-tool { padding: 0; width: 34px; justify-content: center; color: #9aa1ac; }
.tb-tool.is-open { color: #fff; background: rgb(255 255 255 / 10%); }
.tb-home .icon, .tb-btn .icon { width: 17px; height: 17px; }
.tabs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 0 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; border-radius: 9px; min-width: 120px; max-width: 210px;
  color: #aab1bc; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; transition: background .15s, color .15s;
  animation: tabIn .3s var(--ease-spring) both; border: 1px solid transparent;
}
.tab:hover { background: rgb(255 255 255 / 6%); color: #fff; }
.tab.active { background: #1d2129; color: #fff; border-color: rgb(255 255 255 / 9%); box-shadow: inset 0 -2px 0 var(--tone); }
.tab.ingrid { color: #dfe3e9; }
.tab.ingrid::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--tone); opacity: .7; }
.tab.closing { opacity: 0; transform: scale(.9); transition: all .18s; }
.tab-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--tone); color: #fff; flex: none; }
.tab-ic .icon { width: 13px; height: 13px; }
.tab-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: inherit; opacity: .55; cursor: pointer; }
.tab-x:hover { opacity: 1; background: rgb(255 255 255 / 12%); }
.tab-x .icon { width: 13px; height: 13px; }
.tbadge, .dbadge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; animation: pop .35s var(--ease-spring); }
@keyframes tabIn { from { opacity: 0; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: none; } }
.tb-right { display: flex; align-items: center; gap: 6px; padding-left: 6px; }
.tb-sep { width: 1px; height: 22px; background: rgb(255 255 255 / 9%); margin: 0 4px; }
.api-status { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgb(255 255 255 / 6%); font-size: 12px; font-weight: 600; color: #c5cad3; white-space: nowrap; }
.api-status i { width: 8px; height: 8px; border-radius: 50%; background: #8a909c; }
.api-status.ok i { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 22%); animation: breathe 2.4s ease-in-out infinite; }
.api-status.off i { background: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / 25%); }
.api-status.off { color: #fca5a5; }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgb(34 197 94 / 8%); } }
.tb-clock { display: grid; text-align: right; line-height: 1.1; padding: 0 6px 0 4px; color: #fff; font-variant-numeric: tabular-nums; }
.tb-clock b { font-size: 13px; }
.tb-clock small { font-size: 10.5px; color: #8a909c; }

/* ---------- Área de trabalho ---------- */
.workspace { position: relative; overflow: hidden; }
.home { position: absolute; inset: 0; overflow: auto; opacity: 0; visibility: hidden; transform: scale(1.015); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .3s; }
.home.visible { opacity: 1; visibility: visible; transform: none; }
/* O fundo fica preso na área visível (sticky): ao rolar a área de trabalho ele acompanha, sem cortar no meio */
.wallpaper { position: sticky; top: 0; height: calc(100vh - 50px); pointer-events: none; }
.wallpaper svg { width: 100%; height: 100%; display: block; }
.wp-bg { fill: #232323; }
.wp-rings circle { stroke: rgb(255 255 255 / 4.5%); }
.wp-rings circle:first-child { stroke: rgb(255 255 255 / 3%); }
.wp-arc { stroke: #3de90f; opacity: .9; }
.wp-arc2 { stroke: rgb(159 245 138 / 45%); }
.wp-dots circle { fill: rgb(255 255 255 / 9%); }
.home-inner { position: relative; margin-top: calc(-100vh + 50px); min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 28px; padding: 40px 48px 32px; color: #fff; }
.home-hello { display: flex; align-items: center; gap: 28px; animation: fadeUp .5s var(--ease) both; }
.home-hello .sz-logo { padding-right: 28px; border-right: 1px solid rgb(255 255 255 / 14%); }
.home-hello h1 { color: #fff; font-size: 22px; }
.home-hello p { color: #9aa3b2; font-size: 14px; max-width: 560px; margin-top: 4px; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, 132px); gap: 18px 14px; align-content: start; }
.dicon { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 6px 10px; border-radius: 18px; border: 1px solid transparent; background: transparent; color: #fff; cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease-spring); animation: iconIn .5s var(--ease-spring) both; }
.dicon:nth-child(2) { animation-delay: .04s; } .dicon:nth-child(3) { animation-delay: .08s; } .dicon:nth-child(4) { animation-delay: .12s; } .dicon:nth-child(5) { animation-delay: .16s; } .dicon:nth-child(6) { animation-delay: .2s; }
.dicon:hover { background: rgb(255 255 255 / 6%); border-color: rgb(255 255 255 / 8%); }
.dicon:hover .squircle { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 34px -10px color-mix(in srgb, var(--tone) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / 25%); }
.dicon:active .squircle { transform: scale(.96); }
@keyframes iconIn { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }
.squircle {
  position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(155deg, color-mix(in srgb, var(--tone) 82%, #fff) 0%, var(--tone) 48%, color-mix(in srgb, var(--tone) 70%, #000) 100%);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--tone) 60%, transparent), inset 0 1px 0 rgb(255 255 255 / 25%);
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.squircle .glyph { width: 34px; height: 34px; color: #fff; stroke-width: 1.7; position: relative; z-index: 1; }
.sq-arc { position: absolute; top: -26px; right: -26px; width: 52px; height: 52px; border-radius: 50%; border: 9px solid transparent; border-top-color: rgb(255 255 255 / 85%); border-right-color: rgb(255 255 255 / 85%); }
.squircle::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(255 255 255 / 16%), transparent 50%); }
.sq-kind { position: absolute; left: 7px; bottom: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: rgb(0 0 0 / 25%); }
.sq-kind .icon { width: 11px; height: 11px; color: #fff; }
.dbadge { position: absolute; top: 4px; right: 4px; z-index: 2; box-shadow: 0 0 0 2px #232323; }
.dname { font-size: 13px; font-weight: 650; margin-top: 6px; text-shadow: 0 1px 2px rgb(0 0 0 / 40%); text-align: center; }
.dsub { font-size: 11px; color: #8a93a3; text-align: center; line-height: 1.25; }
.dicon.is-open .dname::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: #9ff58a; margin: 4px auto 0; }
.widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; animation: fadeUp .6s var(--ease) .15s both; }
.widget { padding: 16px 18px; border-radius: 18px; background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 8%); backdrop-filter: blur(14px); color: #dfe3ea; font-size: 13px; }
.widget h4 { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; margin-bottom: 10px; }
.widget h4 .icon { width: 16px; height: 16px; color: #9ff58a; }
.widget p { color: #9aa3b2; }
.widget b { color: #fff; }
.sess { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sess li { display: grid; grid-template-columns: 10px 112px 1fr; gap: 8px; align-items: center; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 18%); }
.sdot.on { background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.sn { color: #c5cad3; font-weight: 600; font-size: 12.5px; }
.su { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.su small { color: #8a93a3; margin-left: 4px; }
.rw { display: flex; gap: 14px; align-items: center; }
.rw svg { transform: rotate(-90deg); flex: none; }
.rw-bg { fill: none; stroke: rgb(255 255 255 / 10%); stroke-width: 6; }
.rw-fg { fill: none; stroke: var(--sz-blue); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.rw p { font-size: 12px; margin: 2px 0 8px; }

/* ---------- Janelas ---------- */
.windows { position: absolute; inset: 0; }
.windows.hidden-all { pointer-events: none; }
.win { position: absolute; inset: 0; display: none; flex-direction: column; min-width: 0; min-height: 0; background: var(--sz-bg); }
.win.active { display: flex; }
.win.opening { animation: winOpen .38s var(--ease-spring) both; }
.win.closing { animation: winClose .18s ease both; display: flex; }
@keyframes winOpen { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes winClose { to { opacity: 0; transform: scale(.97); } }
.win-head { display: none; }
.win-web, .win-phone { background: radial-gradient(900px 500px at 85% 0%, rgb(61 233 15 / 18%), transparent 60%), #101318; }

/* modo lado a lado */
.windows.grid { display: grid; gap: 12px; padding: 12px; }
.windows.grid .win { position: relative; inset: auto; display: flex; border-radius: 16px; overflow: hidden; border: 1px solid rgb(255 255 255 / 8%); box-shadow: 0 20px 40px -20px rgb(0 0 0 / 70%); animation: winOpen .35s var(--ease) both; }
.windows.grid .win-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; background: #14171c; color: #dfe3ea; font-size: 12.5px; border-bottom: 1px solid rgb(255 255 255 / 7%); flex: none; }
.wh-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--tone); color: #fff; }
.wh-ic .icon { width: 12px; height: 12px; }
.win-head b { flex: 1; }
.wh-focus { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #8a93a3; cursor: pointer; }
.wh-focus:hover { background: rgb(255 255 255 / 9%); color: #fff; }
.wh-focus .icon { width: 14px; height: 14px; }
.win.pulse { animation: pulseWin .9s var(--ease); }
@keyframes pulseWin { 30% { box-shadow: 0 0 0 3px var(--sz-blue); } }
.windows.grid .browser { margin: 0; border-radius: 0; border: 0; }
.windows.grid .browser-bar { display: none; }

/* moldura de navegador */
.browser { flex: 1; min-height: 0; margin: 12px; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--sz-bg); box-shadow: 0 30px 60px -24px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 8%); }
.browser-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px; background: #e9ecf0; border-bottom: 1px solid #d6dae0; color: #5b6270; flex: none; }
:root[data-theme="dark"] .browser-bar { background: #1b1f26; border-color: #262b34; color: #a7adb8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .browser-bar { background: #1b1f26; border-color: #262b34; color: #a7adb8; } }
.dots { display: flex; gap: 7px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.bnav { display: flex; gap: 6px; align-items: center; }
.bnav .icon { width: 16px; height: 16px; opacity: .5; }
.bnav button { border: 0; background: transparent; padding: 0; display: grid; cursor: pointer; color: inherit; }
.bnav button .icon { opacity: .85; }
.url { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--sz-surface); font-size: 12.5px; color: var(--sz-text-2); }
.url .icon { width: 13px; height: 13px; color: var(--sz-success); }
.b-title { margin-left: auto; font-size: 12px; font-weight: 600; opacity: .7; }
.browser-view { position: relative; flex: 1; min-height: 0; display: flex; container-type: inline-size; }
/* Botões "Celular" e "abrir em aba" da barra do navegador */
.b-mob { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font: 600 12px/1 var(--sz-font); cursor: pointer; text-decoration: none; opacity: .8; }
.b-mob .icon { width: 14px; height: 14px; }
.b-mob:hover { opacity: 1; background: rgb(127 127 127 / 14%); }
.b-mob.on { opacity: 1; color: #0d2410; background: var(--kp-neon); }
/* Modo celular: a área do site fica com 390 px no centro, como a tela de um telefone */
.browser.mob { background: #0b0d10; }
.browser.mob .browser-view { flex: 1; align-self: center; width: 390px; max-width: calc(100% - 20px); margin: 12px 0; border-radius: 26px; overflow: hidden; box-shadow: 0 0 0 8px #1c2027, 0 0 0 9px #2c313a, 0 24px 60px -20px rgb(0 0 0 / 80%); }
.browser-view > .app-root { flex: 1; min-width: 0; min-height: 0; display: flex; container-type: inline-size; }
.app-overlay { position: absolute; inset: 0; pointer-events: none; }
.app-overlay > * { pointer-events: auto; }
.toolwin { position: relative; flex: 1; min-height: 0; display: flex; }
.toolwin > .app-root { flex: 1; min-width: 0; display: flex; container-type: inline-size; }

/* ---------- Smartphone ---------- */
.phone-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.phone {
  --s: 1; position: relative; width: var(--pw); height: var(--ph); flex: none;
  transform: scale(var(--s)); transform-origin: center center; margin: calc((var(--ph) * (var(--s) - 1)) / 2) calc((var(--pw) * (var(--s) - 1)) / 2);
}
.phone-body {
  position: absolute; inset: 0; border-radius: 64px; padding: 13px;
  background: linear-gradient(145deg, #4a4f58 0%, #1e2127 22%, #0f1114 55%, #2b2f36 100%);
  box-shadow: 0 0 0 1.5px #08090b, inset 0 0 0 2px #5d636d, inset 0 0 0 5px #121418, 0 50px 90px -30px rgb(0 0 0 / 85%), 0 18px 30px -18px rgb(0 0 0 / 60%);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 52px; overflow: hidden; background: var(--sz-bg); isolation: isolate; container-type: inline-size; }
.phone-screen > .app-root { position: absolute; inset: 0; display: flex; flex-direction: column; }
.pbtn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2b2f36, #555b65); }
.pbtn-a { left: -3px; top: 150px; height: 30px; }
.pbtn-b { left: -3px; top: 205px; height: 58px; }
.pbtn-c { left: -3px; top: 275px; height: 58px; }
.pbtn-p { right: -3px; top: 230px; height: 92px; background: linear-gradient(270deg, #2b2f36, #555b65); }
.glare { position: absolute; inset: 13px; border-radius: 52px; pointer-events: none; z-index: 5; background: linear-gradient(115deg, rgb(255 255 255 / 9%) 0%, rgb(255 255 255 / 2%) 24%, transparent 36%); }
.sbar { position: absolute; z-index: 60; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 38px; font-size: 15px; font-weight: 650; color: var(--sbar, var(--sz-text)); pointer-events: none; transition: color .3s; }
.phone-screen[data-sbar="light"] .sbar { --sbar: #fff; }
.sb-time { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.island { position: absolute; left: 50%; top: 11px; transform: translateX(-50%); width: 122px; height: 35px; border-radius: 20px; background: #000; }
.island i { position: absolute; right: 13px; top: 11px; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3d63, #0b0f18 60%); }
.sb-ic { display: flex; align-items: center; gap: 6px; }
.sb-ic svg { fill: currentColor; }
.batt { position: relative; width: 26px; height: 12.5px; border-radius: 4px; border: 1.5px solid currentColor; opacity: .95; padding: 1.5px; }
.batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; opacity: .5; }
.batt i { display: block; height: 100%; border-radius: 1.5px; background: currentColor; }
.home-ind { position: absolute; z-index: 60; left: 50%; bottom: 8px; transform: translateX(-50%); width: 136px; height: 5px; border-radius: 3px; background: var(--sbar, var(--sz-text)); opacity: .85; pointer-events: none; }
.phone-label { display: flex; gap: 6px; align-items: center; margin-top: 10px; color: #6b7382; font-size: 12px; font-weight: 600; }
.phone-label .icon { width: 14px; height: 14px; }
.windows.grid .phone-label { display: none; }
.phone-splash { position: absolute; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(500px 400px at 80% 0%, rgb(61 233 15 / 55%), transparent 60%), #232323; transition: opacity .4s var(--ease), transform .45s var(--ease); }
.phone-splash.out { opacity: 0; transform: scale(1.06); }
.ps-word { opacity: 0; animation: fadeUp .45s var(--ease) .5s forwards; }
.phone-screen .toast-stack { left: 12px; right: 12px; top: 54px; bottom: auto; max-width: none; align-items: stretch; }
.phone-screen .toast { border-radius: 20px; min-width: 0; transform: translateY(-16px) scale(.97); }
.phone-screen .toast.in { transform: none; }
.phone-screen .toast.out { transform: translateY(-20px); }
.phone-screen .modal-ov { z-index: 70; }

@media (max-width: 1100px) {
  .tb-home span, .tb-btn span { display: none; }
  .widgets { grid-template-columns: 1fr 1fr; }
  .widget-tip { display: none; }
  .home-inner { padding: 28px; }
}

/* ---------------- Bancos de dados (PostgreSQL) ---------------- */
.widget-db { grid-column: 1 / -1; display: grid; gap: 14px; }
.db-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.db-head h4 { margin: 0; }
.db-head small { color: #8a93a3; font-size: 12px; }
.db-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.db-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.db-pill.ok { color: #3de90f; background: rgb(61 233 15 / 12%); }
.db-pill.atencao { color: #f5c542; background: rgb(245 197 66 / 12%); }
.db-pill.erro { color: #ff6b6b; background: rgb(255 92 92 / 14%); }
.db-refresh, .db-copy { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: rgb(255 255 255 / 6%); color: #c5cad3; cursor: pointer; }
.db-refresh { margin-left: auto; }
.db-refresh:hover, .db-copy:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.db-refresh .icon, .db-copy .icon { width: 14px; height: 14px; }
.db-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.db-cred { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.db-cred > div { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: rgb(0 0 0 / 22%); border: 1px solid rgb(255 255 255 / 6%); }
.db-cred span { flex: none; width: 58px; color: #8a93a3; font-size: 11.5px; font-weight: 600; }
.db-cred code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9ff58a; font-size: 13px; background: none; padding: 0; }
.db-cred .db-url { grid-column: 1 / -1; }
.db-cred .db-url code { color: #dfe3ea; font-size: 12px; }
.db-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.db-nums > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgb(255 255 255 / 4%); }
.db-nums b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.db-nums em { font-style: normal; font-size: 12px; color: #8a93a3; font-weight: 600; }
.db-nums small { color: #8a93a3; font-size: 11px; }
.db-err { color: #ff8a8a !important; display: flex; gap: 8px; align-items: center; }
.db-alertas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.db-alertas li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgb(245 197 66 / 10%); color: #f5d77a; font-size: 12.5px; }
.db-alertas .icon { width: 14px; height: 14px; flex: none; }
.db-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.db-banco { display: grid; gap: 6px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 8%); background: rgb(255 255 255 / 4%); color: #dfe3ea; font: inherit; font-size: 12.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.db-banco:hover { background: rgb(255 255 255 / 7%); }
.db-banco-h { display: flex; align-items: center; gap: 8px; }
.db-banco-h i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #3de90f; box-shadow: 0 0 0 3px rgb(61 233 15 / 20%); }
.db-banco.atencao .db-banco-h i { background: #f5c542; box-shadow: 0 0 0 3px rgb(245 197 66 / 20%); }
.db-banco.erro { border-color: rgb(255 92 92 / 40%); }
.db-banco.erro .db-banco-h i { background: #ff5c5c; box-shadow: 0 0 0 3px rgb(255 92 92 / 22%); }
.db-banco-h b { font-size: 13px; }
.db-banco-h em { margin-left: auto; font-style: normal; font-size: 11px; color: #8a93a3; }
.db-banco small { color: #8a93a3; font-size: 11.5px; line-height: 1.35; }
.db-banco-n { display: flex; justify-content: space-between; font-size: 12px; color: #c5cad3; font-variant-numeric: tabular-nums; }
.db-tabs { display: none; gap: 3px; padding-top: 6px; border-top: 1px dashed rgb(255 255 255 / 10%); }
.db-banco.open .db-tabs { display: grid; }
.db-tabs span { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.db-tabs code { background: none; padding: 0; color: #9ff58a; font-size: 11.5px; }
.db-tabs em { font-style: normal; color: #c5cad3; font-variant-numeric: tabular-nums; }
.db-tabs .falta code, .db-tabs .falta em { color: #ff8a8a; }
.db-foot { font-size: 11.5px; }
.db-foot code { background: rgb(255 255 255 / 6%); padding: 1px 6px; border-radius: 6px; color: #c5cad3; font-size: 11px; }
@media (max-width: 1300px) { .db-top { grid-template-columns: 1fr; } .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------------- Legenda dos bancos ---------------- */
.db-leg-btn { margin-left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; border: 1px solid rgb(61 233 15 / 35%); background: rgb(61 233 15 / 10%); color: #9ff58a; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.db-leg-btn:hover { background: rgb(61 233 15 / 20%); color: #fff; }
.db-leg-btn .icon { width: 12px; height: 12px; }
.db-banco-h em { margin-left: auto; }
.db-leg-ov { position: fixed; inset: 0; z-index: 1000; /* acima do painel Programação (950) */ display: grid; place-items: center; padding: 24px; background: rgb(8 12 10 / 62%); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.db-leg-ov.in { opacity: 1; }
.db-leg { width: min(1320px, 100%); height: min(880px, 100%); display: grid; grid-template-rows: auto auto 1fr; overflow: hidden; border-radius: 20px; background: #1d211f; border: 1px solid rgb(255 255 255 / 10%); box-shadow: 0 30px 80px rgb(0 0 0 / 55%); color: #dfe3ea; font-size: 13px; transform: translateY(10px) scale(.985); transition: transform .25s var(--ease); }
.db-leg-ov.in .db-leg { transform: none; }
.db-leg-load { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px; color: #9aa3b2; grid-row: 1 / -1; }
.db-leg-load .icon { width: 18px; height: 18px; color: #9ff58a; }
.db-leg-h { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px 22px 14px; background: radial-gradient(500px 160px at 0% 0%, rgb(61 233 15 / 14%), transparent 70%); border-bottom: 1px solid rgb(255 255 255 / 7%); }
.db-leg-h small { color: #8a93a3; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.db-leg-h h3 { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; color: #fff; font-size: 19px; }
.db-leg-h h3 .icon { width: 19px; height: 19px; color: #9ff58a; }
.db-leg-h p { color: #9aa3b2; margin: 0; }
.db-leg-acts { display: flex; gap: 8px; align-items: center; }
.db-leg-sel { height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid rgb(255 255 255 / 12%); background: #262b28; color: #dfe3ea; font: inherit; font-size: 12.5px; }
.db-leg-x { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgb(255 255 255 / 7%); color: #dfe3ea; cursor: pointer; }
.db-leg-x:hover { background: rgb(255 92 92 / 25%); color: #fff; }
.db-leg-x .icon { width: 16px; height: 16px; }
.db-leg-chaves { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 22px; border-bottom: 1px solid rgb(255 255 255 / 7%); background: rgb(0 0 0 / 18%); font-size: 12px; color: #9aa3b2; }
.db-leg-chaves span { display: inline-flex; align-items: center; gap: 6px; }
.kb { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .02em; border: 0; font-family: inherit; line-height: 1; vertical-align: middle; }
.kb.pk { background: #f5c542; color: #2a2100; }
.kb.fk { background: rgb(47 184 255 / 18%); color: #7fd0ff; border: 1px solid rgb(47 184 255 / 40%); }
.kb.uq { background: rgb(197 139 255 / 18%); color: #d6b3ff; }
.kb.ix { background: rgb(255 255 255 / 8%); color: #c5cad3; }
.kb.nn { background: none; color: #ff8a8a; min-width: 0; padding: 0 2px; font-size: 13px; }
.kb.ck { background: rgb(61 233 15 / 15%); color: #9ff58a; }
.kb.tg { background: rgb(255 138 61 / 18%); color: #ffb37a; }
.kb.lnk, .pill-c.lnk { cursor: pointer; }
.kb.fk.lnk:hover { background: rgb(47 184 255 / 32%); color: #fff; }
.db-leg-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.db-leg-nav { display: grid; align-content: start; gap: 2px; padding: 12px; overflow-y: auto; border-right: 1px solid rgb(255 255 255 / 7%); }
.db-leg-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: #c5cad3; text-decoration: none; }
.db-leg-nav a:hover { background: rgb(255 255 255 / 6%); }
.db-leg-nav a.on { background: rgb(61 233 15 / 12%); }
.db-leg-nav a.on code { color: #9ff58a; }
.db-leg-nav code { background: none; padding: 0; font-size: 12.5px; color: #dfe3ea; }
.db-leg-nav em { font-style: normal; font-size: 11px; color: #8a93a3; white-space: nowrap; }
.db-leg-main { overflow-y: auto; padding: 14px 20px 40px; scroll-behavior: smooth; }
.db-leg-t { padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 7%); background: rgb(255 255 255 / 2.5%); }
.db-leg-t.flash { animation: legFlash 1.2s var(--ease); }
@keyframes legFlash { 0% { border-color: #3de90f; box-shadow: 0 0 0 3px rgb(61 233 15 / 25%); } 100% { border-color: rgb(255 255 255 / 7%); box-shadow: none; } }
.db-leg-th { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.db-leg-th h4 { margin: 0; }
.db-leg-th h4 code { background: none; padding: 0; color: #fff; font-size: 16px; }
.db-leg-th span { color: #8a93a3; font-size: 12px; }
.db-leg-desc { margin: 4px 0 10px; color: #9aa3b2; }
.db-leg-tw { overflow-x: auto; }
.db-leg-cols { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.db-leg-cols th { text-align: left; padding: 7px 10px; color: #8a93a3; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid rgb(255 255 255 / 8%); white-space: nowrap; }
.db-leg-cols td { padding: 7px 10px; border-bottom: 1px solid rgb(255 255 255 / 5%); vertical-align: top; }
.db-leg-cols tr:hover td { background: rgb(255 255 255 / 2.5%); }
.db-leg-cols tr.is-pk td { background: rgb(245 197 66 / 5%); }
.db-leg-cols .cn { background: none; padding: 0; color: #fff; font-weight: 600; font-size: 12.5px; }
.db-leg-cols .ct { color: #c5cad3; white-space: nowrap; }
.db-leg-cols td small { display: block; color: #8a93a3; font-size: 11px; margin-top: 2px; }
.db-leg-cols .ck { white-space: nowrap; }
.db-leg-cols .ck .kb { margin: 0 4px 3px 0; }
.db-leg-cols .cd { color: #c5cad3; }
.db-leg-cols .cv, .db-leg-cols .cr { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.db-leg-cols .cv code, .db-leg-cols .cr code { background: rgb(61 233 15 / 8%); color: #b8f7a8; padding: 1px 6px; border-radius: 5px; font-size: 11px; }
.db-leg-cols .cx { display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; background: rgb(0 0 0 / 25%); color: #dfe3ea; padding: 2px 6px; border-radius: 5px; font-size: 11.5px; }
.db-leg-cols .cz { color: #5f6672; }
.db-leg-extra { display: grid; gap: 8px; margin-top: 10px; }
.db-leg-extra h5 { margin: 0 0 5px; font-size: 11px; color: #8a93a3; text-transform: uppercase; letter-spacing: .05em; }
.db-leg-extra > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.db-leg-extra h5 { width: 100%; }
.pill-c { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 7%); color: #c5cad3; font: inherit; font-size: 12px; }
.pill-c code { background: none; padding: 0; color: #dfe3ea; font-size: 11.5px; }
.pill-c em { font-style: normal; color: #7fd0ff; font-size: 11px; }
.pill-c.lnk:hover { border-color: rgb(47 184 255 / 45%); }
.db-neg { color: #ff8a8a; }