/* ===================================================================
   Estúdio — visual de automação de rádio (azul-marinho, ciano, LED)
   =================================================================== */
:root {
  --bg: #071022;
  --panel: #0c1a33;
  --panel2: #11244a;
  --row: #0f2142;
  --row-alt: #0d1d3b;
  --line: #1d3563;
  --line2: #27457c;
  --text: #e4efff;
  --muted: #7f97bd;
  --cyan: #38d1ff;
  --accent: #1f7cff;
  --ok: #21c45d;
  --warn: #f2b01e;
  --danger: #e5303a;
  --live: #ff2a2a;
  --orange: #ff8a1f;
  --musica: #4ca8ff;
  --vinheta: #b48cff;
  --propaganda: #ffc23d;
  --efeito: #3fe0c8;
  --cart: #0d6f78;
  --cart2: #109099;
  --radius: 6px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Segoe UI Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1, h3 { margin: 0 0 .6rem; }
h3 { font-size: 14px; color: var(--cyan); text-transform: uppercase; letter-spacing: .5px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; }
small { font-size: 11px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: .6rem 0 0; }
[hidden] { display: none !important; }

input, select, button { font: inherit; color: inherit; }
input, select { background: #081530; border: 1px solid var(--line2); border-radius: 4px; padding: 6px 8px; min-width: 0; }
input[type=range] { padding: 0; accent-color: var(--cyan); width: 100%; background: none; border: 0; }
input[type=checkbox] { accent-color: var(--cyan); }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: -1px; }

.btn {
  background: linear-gradient(#1a3366, #132850); border: 1px solid var(--line2); border-radius: 4px; padding: 7px 12px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--cyan); }
.btn.primary { background: linear-gradient(#2a8cff, #1663d6); border-color: #3b97ff; color: #fff; }
.btn.danger { background: transparent; border-color: #6b2230; color: #ff8790; }
.btn.danger:hover { background: #3a1018; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.big { padding: 14px 28px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: wait; }

.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-width: 0; }
.panel-h { font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: .6px; font-size: 12px; margin-bottom: 8px; }

/* ---------- Login / boot ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(circle at 30% 20%, #102a5a, var(--bg) 60%); }
.login { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 28px; width: 100%; max-width: 360px; display: grid; gap: 12px; }
.login label { display: grid; gap: 4px; color: var(--muted); }
.login .err { background: #3a1018; color: #ff9ba1; padding: 8px 10px; border-radius: 6px; }
.login .warn { color: var(--warn); font-size: 12px; margin: 0; }
.boot { position: fixed; inset: 0; background: rgba(4, 9, 20, .93); z-index: 50; display: grid; place-items: center; padding: 16px; }
.boot-card { text-align: center; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 36px; max-width: 420px; }

/* ---------- Barra superior ---------- */
.top {
  display: flex; align-items: stretch; gap: 10px; padding: 8px 10px; background: linear-gradient(#0f2247, #0a1833);
  border-bottom: 2px solid var(--line2); position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.onair {
  display: grid; place-items: center; padding: 0 14px; border-radius: 4px; font-weight: 900; letter-spacing: 2px; font-size: 15px;
  background: #3a0d12; color: #8a3a42; border: 1px solid #5a1a22; min-width: 92px;
}
.onair.live { background: var(--live); color: #fff; border-color: #ff6b6b; box-shadow: 0 0 18px rgba(255, 42, 42, .7); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .78; } }
.scope-wrap { position: relative; flex: 1 1 240px; min-width: 200px; height: 58px; background: #050c1a; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.scope { width: 100%; height: 100%; display: block; }
.scope-info { position: absolute; left: 8px; bottom: 3px; right: 8px; font-size: 11px; color: #ffd0a8; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.meters { display: grid; gap: 4px; align-content: center; width: 190px; }
.meter { display: flex; align-items: center; gap: 6px; font: 700 10px var(--mono); color: var(--muted); }
.meter span { width: 24px; }
.vu {
  position: relative; flex: 1; height: 11px; border-radius: 2px; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, #050c1a 5px 7px),
    linear-gradient(90deg, #17c24d 0%, #17c24d 62%, #f2d21e 78%, #ff7a1a 88%, #ff2626 96%);
}
.vu-mask { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: #0a1428; transition: width .05s linear; }
.counters { display: flex; gap: 6px; }
.cnt { background: #050c1a; border: 1px solid var(--line2); border-radius: 4px; padding: 3px 10px; display: grid; align-content: center; text-align: right; min-width: 86px; }
.cnt small { font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.cnt b { font: 700 20px/1.1 var(--mono); color: var(--cyan); }
.cnt.big b { font-size: 26px; color: #fff; }
.cnt.big b.ending { color: var(--live); }
.clock-box { background: #050c1a; border: 1px solid var(--line2); border-radius: 4px; padding: 3px 12px; display: grid; align-content: center; text-align: center; }
.clock-box small { font-size: 10px; color: var(--muted); text-transform: capitalize; }
.clock { font: 700 28px/1.05 var(--mono); color: var(--orange); letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 138, 31, .35); }
.top-actions { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.btn.toggle { font-weight: 800; letter-spacing: 1px; }
.btn.toggle.on { background: linear-gradient(#25d366, #139c47); border-color: #4be38a; color: #fff; }

/* ---------- Mesa: 3 colunas ---------- */
.desk { display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(280px, .8fr) minmax(380px, 1.25fr); gap: 8px; padding: 8px; align-items: start; }
@media (max-width: 1250px) { .desk { grid-template-columns: minmax(340px, 1fr) minmax(280px, 1fr); } .col-tabs { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .desk { grid-template-columns: 1fr; padding: 6px; }
  .meters { width: 100%; order: 5; }
  .counters, .clock-box { flex: 1; }
}
.col-mid { display: grid; gap: 8px; }

/* ---------- Programação (log) ---------- */
.col-log { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.log-toolbar { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: linear-gradient(#152c58, #0f2246); border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.log-toolbar .panel-h { margin: 0; }
.transport { display: flex; gap: 4px; margin-left: auto; }
.tbtn { width: 40px; height: 32px; border-radius: 4px; border: 1px solid var(--line2); background: linear-gradient(#1d3a72, #142b56); color: #9fe7ff; cursor: pointer; font-size: 15px; }
.tbtn:hover { border-color: var(--cyan); color: #fff; }
.tbtn.play { color: #5dff9a; }
.tbtn.stop { color: #ff7d86; }
.vol { display: flex; align-items: center; gap: 6px; font: 700 10px var(--mono); color: var(--muted); width: 130px; }
.log { max-height: calc(100vh - 170px); min-height: 360px; overflow-y: auto; }
.log-sec { display: grid; grid-template-columns: 22px 1fr; border-bottom: 1px solid var(--line); }
.side {
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font: 800 10px var(--mono); letter-spacing: 2px;
  color: #cfe3ff; background: #1a3570; display: flex; align-items: center; justify-content: center; padding: 4px 0;
}
.past .side { background: #233150; color: #8aa0c4; }
.now .side { background: var(--live); color: #fff; }
.next .side { background: #1b5fd0; }
.log ol { list-style: none; margin: 0; padding: 0; min-width: 0; }
.lrow { display: grid; grid-template-columns: 54px 1fr auto auto; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #0b1a36; background: var(--row); min-height: 34px; }
.lrow:nth-child(even) { background: var(--row-alt); }
.lrow .lt { font: 600 12px var(--mono); color: var(--cyan); }
.lrow .ln { min-width: 0; }
.lrow .ln b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .ln small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .ld { font: 12px var(--mono); color: #b9cbe8; text-align: right; }
.lrow .ico { width: 8px; height: 28px; border-radius: 2px; }
.lrow .ico.musica { background: var(--musica); }
.lrow .ico.vinheta { background: var(--vinheta); }
.lrow .ico.propaganda { background: var(--propaganda); }
.lrow .ico.efeito { background: var(--efeito); }
.lrow.auto { opacity: .7; font-style: italic; }
.lrow.empty { grid-template-columns: 1fr; color: var(--muted); font-style: italic; }
.past .lrow { opacity: .55; }
.past .lrow .lt { color: var(--muted); }
.lrow.blockh { grid-template-columns: 1fr; min-height: 0; padding: 3px 8px; background: #20345f; font: 700 10px var(--mono); color: var(--propaganda); letter-spacing: 1px; }
.lrow .act { display: flex; gap: 2px; }
.act button { background: transparent; border: 1px solid var(--line2); border-radius: 3px; padding: 2px 7px; cursor: pointer; font-size: 11px; }
.act button:hover { background: #1d3a72; border-color: var(--cyan); }
.queue li.lrow { grid-template-columns: 8px 54px 1fr auto auto; }
.queue li.lrow.blockh, .queue li.lrow.empty { grid-template-columns: 1fr; }

.now-band { background: linear-gradient(135deg, #1757c9, #0f3b8f); padding: 10px 12px; min-width: 0; border-left: 3px solid #6fb2ff; }
.nb-top { display: flex; justify-content: space-between; align-items: center; }
.nb-start { font: 600 12px var(--mono); color: #bcd8ff; }
.nb-title { font-size: 24px; font-weight: 800; line-height: 1.15; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.nb-artist { font-size: 15px; color: #cfe3ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.progress { flex: 1; height: 8px; background: rgba(0, 0, 0, .35); border-radius: 2px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, #6fe3ff, #fff); }
.nb-remain { font: 800 26px var(--mono); }
.nb-remain.ending { color: #ffd2d2; animation: pulse .8s infinite; }
.nb-next { margin-top: 6px; font-size: 12px; color: #bcd8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-foot { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-top: 1px solid var(--line2); background: #0a1730; font-size: 11px; flex-wrap: wrap; }

/* ---------- Cartucheira ---------- */
.cart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 5px; }
.cart-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-btn {
  position: relative; width: 100%; min-height: 52px; padding: 16px 6px 12px; border-radius: 4px; cursor: pointer; overflow: hidden;
  background: linear-gradient(var(--cart2), var(--cart)); border: 1px solid #1bb3bd; color: #e8ffff;
  font-size: 12px; font-weight: 700; text-align: left; display: flex; flex-direction: column; justify-content: center;
}
.cart-btn .cn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-btn small { position: absolute; top: 3px; right: 6px; color: #b5f3f5; font: 600 10px var(--mono); }
.cart-btn kbd { position: absolute; top: 3px; left: 6px; font: 700 10px var(--mono); color: #fff; background: rgba(0, 0, 0, .3); padding: 0 4px; border-radius: 2px; }
.cart-btn .cprog { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: #7dfcff; }
.cart-btn:hover { filter: brightness(1.15); }
.cart-btn.live { background: linear-gradient(#ff5a1f, #c43b10); border-color: #ffa16b; }
.cart-btn.live .cprog { background: #fff; }
.cart-btn.propaganda { background: linear-gradient(#8a6a12, #66500d); border-color: #c79a1d; }
.cart-btn.vinheta { background: linear-gradient(var(--cart2), var(--cart)); }
.cart-btn.efeito { background: linear-gradient(#1a7f5c, #106046); border-color: #28c48e; }
.cart-btn.musica { background: linear-gradient(#1f5aa8, #164382); border-color: #3a7fd6; }
.cart-btn.propaganda.live, .cart-btn.efeito.live, .cart-btn.musica.live { background: linear-gradient(#ff5a1f, #c43b10); }
.cart-ed { display: flex; gap: 2px; }
.cart-ed button { flex: 1; background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; font-size: 11px; padding: 2px 0; }
.cart-tools { margin-top: 10px; display: grid; gap: 8px; }
.cart-tools input[type=file] { flex: 1 1 160px; }

/* ---------- Microfone ---------- */
.mic-btn { width: 100%; padding: 14px; font-size: 16px; font-weight: 800; flex-direction: column; gap: 2px; letter-spacing: .5px; }
.mic-btn small { font-weight: 400; color: var(--muted); }
.mic-btn.live { background: linear-gradient(#ff3b3b, #c51c1c); border-color: #ff7b7b; color: #fff; box-shadow: 0 0 18px rgba(255, 42, 42, .5); }
.mic-btn.live small { color: #ffe1e1; }
.mic-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mic-quick label, .form-grid label { display: grid; gap: 3px; font-size: 11px; color: var(--muted); }
.duck-box { margin-top: 10px; padding: 8px 10px; background: #081530; border: 1px solid var(--line); border-radius: 4px; display: grid; gap: 6px; }
.duck-on { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
#duckControls { display: grid; gap: 6px; }
#duckControls.off { opacity: .4; pointer-events: none; }
.duck-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); }
.duck-row b { font: 700 15px var(--mono); color: var(--cyan); }
.duck-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.duck-presets button { flex: 1; min-width: 44px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; padding: 3px 0; cursor: pointer; font-size: 11px; }
.duck-presets button:hover { border-color: var(--cyan); }
.duck-presets button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mic-gain { display: grid; gap: 3px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.mic-gain b { font: 700 12px var(--mono); color: var(--cyan); margin-left: 4px; }
.dev { margin-top: 8px; }
.dev summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.form-grid.cfg { max-width: 760px; }
@media (max-width: 480px) { .form-grid, .mic-quick { grid-template-columns: 1fr; } }

/* ---------- Transmissão ---------- */
.stream-status { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; min-width: 0; }
.stream-status span:last-child { overflow: hidden; text-overflow: ellipsis; }
.led { width: 12px; height: 12px; border-radius: 50%; background: #2a3a58; flex: none; }
.led.connecting, .led.retry { background: var(--warn); animation: pulse 1s infinite; }
.led.live { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.led.error { background: var(--danger); }
.stream-stats { font: 11px var(--mono); white-space: nowrap; }
.stream-btn { width: 100%; padding: 10px; font-weight: 800; letter-spacing: .5px; }
.stream-btn.live { background: linear-gradient(#18793c, #105a2b); border-color: var(--ok); color: #b6ffd0; }

/* ---------- Abas ---------- */
.col-tabs { min-height: 300px; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line2); margin: -10px -10px 12px; padding: 6px 6px 0; background: #0a1730; overflow-x: auto; border-radius: var(--radius) var(--radius) 0 0; }
.tabs button { background: #10234a; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; padding: 6px 11px; cursor: pointer; color: var(--muted); white-space: nowrap; font-size: 12px; }
.tabs button.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.tab { display: none; }
.tab.on { display: block; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: .5px; background: var(--panel2); white-space: nowrap; }
.badge:empty { display: none; }
.badge.musica { background: rgba(76, 168, 255, .2); color: #9cd0ff; }
.badge.vinheta { background: rgba(180, 140, 255, .22); color: #dac8ff; }
.badge.propaganda { background: rgba(255, 194, 61, .22); color: #ffd97a; }
.badge.efeito { background: rgba(63, 224, 200, .2); color: #98f2e4; }
.now-band .badge { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Biblioteca e tabelas ---------- */
.upload { background: var(--panel2); border-radius: 4px; padding: 10px; margin-bottom: 12px; border: 1px solid var(--line); }
.upload input[type=file] { flex: 1 1 200px; }
.up-progress { position: relative; height: 20px; background: #050c1a; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.up-progress div { height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.up-progress span { position: absolute; inset: 0; font-size: 11px; display: flex; align-items: center; padding: 0 8px; }
.lib-filters input[type=search] { flex: 1 1 180px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 10px; cursor: pointer; color: var(--muted); font-size: 12px; }
.seg button.on { background: var(--accent); color: #fff; }
.table-wrap { overflow: auto; max-height: calc(100vh - 330px); min-height: 200px; border: 1px solid var(--line); border-radius: 4px; }
table.lib { width: 100%; border-collapse: collapse; font-size: 12px; }
table.lib th { position: sticky; top: 0; background: #16305f; text-align: left; font-weight: 700; color: #bcd3f5; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
table.lib th, table.lib td { padding: 5px 8px; border-bottom: 1px solid #0b1a36; }
table.lib tbody tr:nth-child(odd) td { background: var(--row); }
table.lib tbody tr:nth-child(even) td { background: var(--row-alt); }
table.lib tr:hover td { background: #173264; }
table.lib td.act { white-space: nowrap; }

/* ---------- Playlists ---------- */
.pl-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
@media (max-width: 700px) { .pl-wrap { grid-template-columns: 1fr; } }
.pl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; align-content: start; }
.form-grid label.inline { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; }
.pl-list li { padding: 7px 9px; border-radius: 3px; cursor: pointer; background: var(--row); display: flex; justify-content: space-between; }
.pl-list li.sel { background: var(--accent); color: #fff; }
.pl-list li small { opacity: .7; }
.pl-main input#plName { flex: 1; font-size: 14px; font-weight: 700; }
.pl-main input#plSearch { flex: 1; }
.pl-tracks { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 4px; padding: 3px; }
.chk { display: flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 3px; cursor: pointer; }
.chk:hover { background: var(--panel2); }

/* ---------- Grade, blocos, intercalação ---------- */
.slot, .block { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; margin-bottom: 6px; }
.days { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.days label { display: inline-flex; align-items: center; gap: 4px; background: #081530; padding: 3px 7px; border-radius: 3px; cursor: pointer; font-size: 11px; }
.inline { display: inline-flex; align-items: center; gap: 5px; }
.block-items { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 2px; }
.block-items li { padding: 2px 0; }
.block-items li .act { display: inline-flex; margin-left: 8px; }
.block select[data-f=add] { flex: 1 1 220px; }
.num { width: 64px; }
.mt { margin-top: 20px; }
.inter-line { gap: 6px; }
.brow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; margin-bottom: 5px; }
.brow select[data-f=pick] { flex: 1 1 170px; }
.bnum { width: 22px; height: 22px; border-radius: 50%; background: #081530; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--cyan); }
#jAdd { flex: 1 1 220px; }

/* ---------- Usuários e permissões ---------- */
.operator { background: #050c1a; border: 1px solid var(--line2); border-radius: 4px; padding: 3px 10px; display: grid; align-content: center; gap: 2px; min-width: 120px; }
.operator small { font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.operator b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.operator .btn { padding: 1px 6px; font-size: 11px; }
.perm-banner { padding: 7px 14px; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line2); }
.perm-banner.ok { background: #0f3a22; color: #9ff0bf; }
.perm-banner.off { background: #3a2a0c; color: #ffd98a; }
.locked .transport, .locked .cart-grid, .locked .mic-quick { opacity: .45; }
.btn:disabled, .tbtn:disabled { opacity: .4; cursor: not-allowed; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: .6; }
.slot.ro, .block.ro { border-style: dashed; }
.ro-tag { font-size: 11px; color: var(--warn); margin-bottom: 6px; }
#userEditor { min-width: 0; }

/* ---------- Diálogo e avisos ---------- */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 0; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dlg { padding: 18px; display: grid; gap: 10px; }
.dlg label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
#toasts { position: fixed; right: 14px; bottom: 14px; display: grid; gap: 8px; z-index: 100; max-width: calc(100vw - 28px); }
.toast { background: #142b56; border: 1px solid var(--line2); border-left: 4px solid var(--cyan); padding: 9px 13px; border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); animation: in .2s; }
.toast.err { border-left-color: var(--danger); }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }
