/* ============================================================
   Laboratório Virtual de Manutenção e Suporte a Informática
   Laboratório Virtual de Manutenção — estilos (sem fontes ou CDNs externos)
   ============================================================ */
:root {
  --bg: #eef3f8; --card: #fff; --ink: #14283a; --muted: #4b6175; --line: #d3dfea;
  --brand: #0b5c8a; --brand-d: #083f61; --brand-2: #0f8fb8; --accent: #f2a900;
  --ok: #146c43; --ok-bg: #e2f5ea; --warn: #8a5300; --warn-bg: #fff2d4;
  --err: #a8201a; --err-bg: #fde7e5; --info: #1553b6; --info-bg: #e4eeff; --sw: #5a3fd1; --sw-bg: #efeaff;
  --r: 14px; --sh: 0 1px 2px rgba(16, 48, 74, .08), 0 6px 18px rgba(16, 48, 74, .07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p { margin: 0 0 .75rem; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #ffb703; outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .6rem 1rem; z-index: 999; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- cabeçalho ---------- */
.top { position: sticky; top: 0; z-index: 50; background: linear-gradient(110deg, #082f4a, #0b5c8a 60%, #0f7aa6); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.top-in { max-width: 1280px; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; min-width: 0; }
.brand img { width: 44px; height: 44px; }
.brand b { display: block; font-size: 1.02rem; line-height: 1.15; }
.brand span { display: block; font-size: .78rem; opacity: .85; }
.nav { display: flex; gap: .35rem; flex-wrap: wrap; margin-left: auto; }
.nav a { color: #fff; text-decoration: none; padding: .5rem .85rem; border-radius: 999px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .15); }
.nav a[aria-current="page"] { background: #fff; color: var(--brand-d); }
.pill-prog { font-size: .8rem; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: .3rem .7rem; white-space: nowrap; }

main { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 3rem; outline: none; }
footer { max-width: 1280px; margin: 0 auto; padding: 1rem; color: var(--muted); font-size: .85rem; text-align: center; border-top: 1px solid var(--line); }

/* ---------- cartões, botões, chips ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 1rem 1.1rem; }
.card + .card { margin-top: 1rem; }
.card > h2:first-child { display: flex; align-items: center; gap: .5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: .55rem 1rem; border-radius: 10px; font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--brand-d); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: #eaf3fa; }
.btn.warn { background: #fff; color: var(--err); border-color: var(--err); }
.btn.warn:hover { background: var(--err-bg); }
.btn.sm { padding: .35rem .7rem; font-size: .88rem; border-radius: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--line); background: #f5f9fc; color: var(--muted); }
.chip.hw { background: var(--info-bg); color: var(--info); border-color: #bcd2f5; }
.chip.sw { background: var(--sw-bg); color: var(--sw); border-color: #d2c6fb; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: #b4e0c5; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: #f1d79b; }
.chip.err { background: var(--err-bg); color: var(--err); border-color: #f2bcb8; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.bar { height: 10px; background: #dfe9f2; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #17a46b, #54c98f); border-radius: 99px; transition: width .4s; }

/* ---------- visão geral ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center; background: linear-gradient(120deg, #0a3a5a, #0b6a99); color: #fff; border-radius: 20px; padding: 1.6rem; box-shadow: var(--sh); overflow: hidden; }
.hero h1 { color: #fff; margin-bottom: .6rem; }
.hero p { color: #dcecf7; max-width: 60ch; }
.hero .eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .15); padding: .2rem .7rem; border-radius: 99px; margin-bottom: .7rem; }
.hero-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.hero .btn { background: #ffb703; border-color: #ffb703; color: #231800; }
.hero .btn:hover { background: #ffc83d; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; transform: rotate(-3deg); }
.hero-art img { border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); background: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.grid2 > .card, .grid3 > .card, .grid4 > .card { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: start; }
.steps li::before { content: counter(s); background: var(--brand); color: #fff; border-radius: 50%; width: 2rem; height: 2rem; display: grid; place-items: center; font-weight: 800; }
.rule { display: flex; gap: .7rem; align-items: flex-start; }
.rule .ic { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 12px; font-size: 1.3rem; background: var(--warn-bg); }
.rule.hw .ic { background: var(--info-bg); } .rule.sw .ic { background: var(--sw-bg); } .rule.dg .ic { background: var(--err-bg); }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--brand); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- lista de chamados ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head p { margin: 0; color: var(--muted); max-width: 70ch; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .35rem .85rem; font-weight: 600; color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.tk { display: flex; flex-direction: column; gap: .5rem; padding: 0; overflow: hidden; margin: 0 !important; }
.tk-top { display: flex; gap: .8rem; padding: .9rem 1rem 0; align-items: center; }
.tk-top img { width: 96px; border-radius: 10px; flex: none; }
.tk-no { font-size: .78rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.tk h3 { margin: .1rem 0; }
.tk-body { padding: 0 1rem; flex: 1; font-size: .92rem; color: var(--muted); }
.tk-foot { padding: .6rem 1rem 1rem; display: flex; align-items: center; gap: .6rem; justify-content: space-between; }
.tk .bar { margin: 0 1rem; }
.tk.is-done { border-color: #8fd1ad; }

/* ---------- detalhe do chamado ---------- */
.crumbs { margin-bottom: .6rem; }
.t-head { display: grid; grid-template-columns: auto 1fr minmax(220px, 300px); gap: 1rem; align-items: center; margin-bottom: 1rem; }
.t-head > img { width: 110px; border-radius: 14px; box-shadow: var(--sh); }
.t-head h1 { margin: .15rem 0 .25rem; }
.t-prog b { font-size: 1.4rem; color: var(--brand); }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.t-main > .card + .card { margin-top: 1rem; }
.t-bench { position: sticky; top: 84px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .8rem; margin: 0; }
dl.kv dt { font-weight: 700; color: var(--muted); } dl.kv dd { margin: 0; }
ul.clean { margin: 0; padding-left: 1.2rem; } ul.clean li { margin: .25rem 0; }
.sym { display: grid; grid-template-columns: 1fr minmax(0, 250px); gap: 1rem; align-items: start; }
.fig { margin: 0; text-align: center; font-size: .82rem; color: var(--muted); }
.fig .thumb { display: block; width: 100%; }
.thumb { border: 1px solid var(--line); background: #fff; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; position: relative; line-height: 0; }
.thumb:hover, .thumb:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 92, 138, .18); }
.thumb img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
.thumb .zoom { position: absolute; right: 6px; bottom: 6px; background: rgba(8, 47, 74, .85); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; line-height: 1.4; }
.comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.comp { text-align: center; font-size: .8rem; font-weight: 600; }
.comp .thumb { margin-bottom: .25rem; }
.safety { border-left: 6px solid #e8a100; background: #fffaf0; }

/* bancada */
.bench { padding: 1rem; }
.bench h2 { margin-bottom: .6rem; }
.pc { display: flex; align-items: flex-end; justify-content: center; gap: .8rem; padding: .8rem .6rem; background: linear-gradient(#e6eef5, #d4e2ee); border-radius: 12px; border: 1px solid var(--line); }
.pc-monitor { flex: 1; min-width: 0; max-width: 250px; }
.mon-frame { background: #222b35; padding: 7px 7px 11px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.screen { aspect-ratio: 4 / 3; border-radius: 3px; background: #05080c; color: #cfe3f5; padding: .45rem .55rem; overflow: hidden; font-family: var(--mono); font-size: clamp(.58rem, .9vw, .7rem); line-height: 1.35; position: relative; display: flex; flex-direction: column; }
.screen h5 { margin: 0 0 .3rem; font-size: 1.05em; font-family: var(--font); padding-bottom: .2rem; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.screen pre { margin: 0; font: inherit; white-space: pre-wrap; }
.screen.off { background: #0b0f14; color: #3a4654; align-items: center; justify-content: center; text-align: center; font-family: var(--font); }
.screen.ok { background: #0e3b5c; } .screen.ok h5 { color: #8ff0b8; }
.screen.warn { background: #3b2d08; } .screen.warn h5 { color: #ffd36a; }
.screen.err { background: #3a0d0d; } .screen.err h5 { color: #ff9b94; }
.screen.dark { background: #05080c; } .screen.dark h5 { color: #9fb0bf; }
.mon-neck { width: 22%; height: 12px; background: #6c7a88; margin: 0 auto; }
.mon-foot { width: 46%; height: 6px; background: #566371; margin: 0 auto; border-radius: 4px; }
.pc-tower { width: 78px; flex: none; }
.pc-tower .fan { transform-box: fill-box; transform-origin: center; }
.pc[data-on="true"] .fan { animation: spin .5s linear infinite; }
.pc[data-on="true"] .led { fill: #46e08b; filter: drop-shadow(0 0 3px #46e08b); }
.pc .led { fill: #4b5560; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .7rem 0 .5rem; flex-wrap: wrap; }
.state { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .9rem; padding: .25rem .7rem; border-radius: 99px; background: #e8edf2; color: #3b4b5a; }
.state::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #7a8896; }
.state.on { background: var(--ok-bg); color: var(--ok); } .state.on::before { background: #1fb86a; box-shadow: 0 0 6px #1fb86a; }
.ctrls { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.power { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 2px solid var(--brand-d); background: #fff; color: var(--brand-d); border-radius: 12px; padding: .65rem .5rem; font-weight: 800; }
.power svg { width: 1.4rem; height: 1.4rem; }
.power[aria-pressed="true"] { background: #1a2f40; color: #fff; border-color: #1a2f40; }
.power:hover { filter: brightness(.96); }
.esd { border: 2px solid #c9a227; background: #fff; color: #5b4500; border-radius: 12px; padding: .65rem .5rem; font-weight: 800; }
.esd[aria-pressed="true"] { background: #fff2c2; border-color: #a37f00; }
.sstat { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .3rem; font-size: .86rem; }
.sstat li { display: flex; gap: .5rem; align-items: flex-start; }
.sstat .i { flex: none; width: 1.3rem; text-align: center; }
.sstat .good .i { color: var(--ok); } .sstat .bad .i { color: var(--err); } .sstat .mid .i { color: var(--warn); }
.result { margin-top: .8rem; border-radius: 12px; padding: .7rem .85rem; border: 1px solid var(--line); background: #f5f9fc; font-size: .92rem; min-height: 4.2rem; }
.result b.t { display: block; margin-bottom: .15rem; }
.result.ok { background: var(--ok-bg); border-color: #9fd6b6; } .result.info { background: var(--info-bg); border-color: #b5cdf4; }
.result.bad { background: #f1f1f4; border-color: #cfd2da; } .result.block { background: var(--warn-bg); border-color: #efce86; }
.result.danger { background: var(--err-bg); border-color: #efaaa5; } .result.wait { background: #f0f4ff; border-color: #c5d2f2; }
.result .todo { margin-top: .3rem; font-weight: 700; }
.progress-box { margin-top: .8rem; }
.progress-box .row { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; margin-bottom: .25rem; }
.checklist { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .2rem; font-size: .84rem; }
.checklist li::before { content: "○ "; color: var(--muted); } .checklist li.done::before { content: "✔ "; color: var(--ok); font-weight: 800; }
.checklist li.done { color: var(--ok); }
.done-banner { margin-top: .8rem; background: var(--ok-bg); border: 1px solid #9fd6b6; color: var(--ok); border-radius: 12px; padding: .7rem .85rem; font-weight: 700; }

/* cartões de solução */
.sol-section { margin-top: 1.4rem; }
.sol-section > h2 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sol-section > h2 small { font-weight: 600; color: var(--muted); font-size: .85rem; }
.sols { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: .9rem; }
.sol { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--info); border-radius: 14px; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: var(--sh); }
.sol[data-k="sw"] { border-top-color: var(--sw); }
.sol .thumb { width: 100%; }
.sol h3 { margin: 0; font-size: .98rem; }
.sol .d { font-size: .86rem; color: var(--muted); margin: .2rem 0 0; }
.sol .act { font-size: .84rem; margin: .35rem 0 0; }
.sol-body { flex: 1; }
.sol-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.lock { font-size: .76rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; }
.lock.go { background: var(--ok-bg); color: var(--ok); } .lock.no { background: var(--warn-bg); color: var(--warn); } .lock.never { background: var(--err-bg); color: var(--err); }
.sol .apply { border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 9px; padding: .4rem .85rem; font-weight: 800; }
.sol[data-k="sw"] .apply { background: var(--sw); border-color: var(--sw); }
.sol .apply:hover { filter: brightness(.9); }
.sol.locked .apply { background: #fff; color: var(--muted); border-color: #b9c6d2; }
.sol.danger { border-top-color: var(--err); background: #fff8f7; }
.sol.danger .apply { background: var(--err); border-color: var(--err); }
.sol.is-done { background: #f2fbf6; border-color: #9fd6b6; }
.sol.is-done .apply { background: #fff; color: var(--ok); border-color: #9fd6b6; }
.sol .mark { font-size: .78rem; font-weight: 700; }
.sol .mark.ok { color: var(--ok); } .sol .mark.bad { color: var(--err); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; max-height: 320px; overflow: auto; font-size: .88rem; }
.log li { display: grid; grid-template-columns: 4.6rem 1.4rem 1fr; gap: .4rem; padding: .3rem .4rem; border-radius: 8px; background: #f6f9fc; }
.log time { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.t-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* ---------- montagem ---------- */
.b-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.b-right { position: sticky; top: 84px; display: grid; gap: 1rem; }
.b-right > .card { margin: 0; }
.selbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem; border-radius: 12px; background: var(--info-bg); border: 1px solid #b5cdf4; margin-bottom: .8rem; font-size: .92rem; min-height: 3rem; }
.selbar.idle { background: #f5f9fc; border-color: var(--line); color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.slot { position: relative; border: 2px dashed #9fb4c7; border-radius: 14px; background: #f7fafd; padding: .45rem; display: flex; flex-direction: column; gap: .2rem; min-height: 150px; transition: border-color .15s, background .15s; }
.slot .sl-h { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font-size: .8rem; font-weight: 800; color: var(--brand-d); }
.slot .sl-n { background: var(--brand); color: #fff; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; flex: none; }
.slot .sl-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .2rem; background: transparent; border: 0; padding: .2rem; border-radius: 10px; color: var(--muted); font-size: .78rem; }
.slot .sl-main img { width: 100%; max-width: 104px; border-radius: 8px; }
.slot .ghost { font-size: 2rem; color: #b4c4d3; line-height: 1; }
.slot.filled { border-style: solid; border-color: #7fb89a; background: #f2fbf6; }
.slot.filled .nm { font-weight: 700; color: var(--ink); font-size: .78rem; }
.slot.eligible { border-color: var(--brand-2); background: #e9f6fb; animation: pulse 1.2s ease-in-out infinite; }
.slot.over { border-color: #e8a100; background: #fff6df; transform: scale(1.02); }
.slot.conflict { border-style: solid; border-color: var(--err); background: var(--err-bg); }
.slot .cbadge { position: absolute; top: -9px; right: 8px; background: var(--err); color: #fff; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.slot .sl-f { display: flex; gap: .3rem; justify-content: space-between; }
.slot .sl-f button { border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: .72rem; font-weight: 700; padding: .15rem .45rem; color: var(--ink); }
.slot .sl-f .rm { color: var(--err); border-color: #efbab6; }
.slot.locked { opacity: .96; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(15, 143, 184, .25); } }
.cat-g { margin-top: 1rem; }
.cat-g h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; }
.cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .5rem; }
.part { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .4rem; display: flex; flex-direction: column; gap: .3rem; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; box-shadow: var(--sh); }
.part:hover { border-color: var(--brand); }
.part img { border-radius: 8px; pointer-events: auto; -webkit-user-drag: none; }
.part .pn { font-size: .78rem; font-weight: 700; line-height: 1.2; }
.part .pt { font-size: .7rem; color: var(--muted); }
.part[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 92, 138, .28); background: #eaf4fb; }
.part.used { background: #f2fbf6; border-color: #9fd6b6; }
.part .used-b { position: absolute; top: 6px; left: 6px; background: var(--ok); color: #fff; font-size: .66rem; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.part .info { position: absolute; top: 6px; right: 6px; width: 1.65rem; height: 1.65rem; border-radius: 50%; border: 0; background: rgba(8, 47, 74, .88); color: #fff; font-weight: 800; font-size: .8rem; line-height: 1; padding: 0; }
.ghost-drag { position: fixed; z-index: 400; width: 120px; pointer-events: none; opacity: .92; transform: translate(-50%, -60%) rotate(-3deg); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); border-radius: 10px; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
html:has(body.dragging) { scroll-behavior: auto; }
.chk h2 { display: flex; justify-content: space-between; align-items: center; }
.chk .prog { font-size: .85rem; font-weight: 700; color: var(--muted); }
.it { display: flex; gap: .55rem; padding: .55rem .65rem; border-radius: 10px; margin: .4rem 0; font-size: .88rem; }
.it .i { flex: none; font-weight: 900; }
.it.err { background: var(--err-bg); color: #6c130f; } .it.warn { background: var(--warn-bg); color: #5c3700; } .it.ok { background: var(--ok-bg); color: #0d4a2c; } .it.todo { background: #f1f5f9; color: var(--muted); }
.it b { display: block; }
.post { background: #05080c; color: #b9f5cf; font-family: var(--mono); font-size: .8rem; border-radius: 12px; padding: .8rem; min-height: 7rem; white-space: pre-wrap; }
.post .l { display: block; animation: fadein .3s; } .post .bad { color: #ff9b94; } .post .hl { color: #ffd36a; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.sum { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-top: .6rem; font-size: .84rem; }
.sum div { background: rgba(255, 255, 255, .08); border-radius: 8px; padding: .3rem .5rem; color: #e8fff0; }

/* ---------- caderno de bordo ---------- */
.fields { display: grid; grid-template-columns: 2fr 1fr; gap: .8rem; }
label.f { display: block; font-weight: 700; font-size: .88rem; }
label.f input { width: 100%; margin-top: .25rem; padding: .55rem .7rem; border: 1px solid #a8bccd; border-radius: 10px; font: inherit; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tbl td.n { text-align: center; } .tbl th.n { text-align: center; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
details.lg { margin-top: .5rem; } details.lg summary { cursor: pointer; font-weight: 700; color: var(--brand); }

/* ---------- ficha ampliada ---------- */
#ficha-pop { position: fixed; z-index: 300; width: min(420px, calc(100vw - 20px)); background: #fff; border: 1px solid #9fb4c7; border-radius: 16px; box-shadow: 0 18px 50px rgba(8, 32, 52, .38); overflow: hidden; pointer-events: none; }
.ficha .fimg { background: linear-gradient(135deg, #f1f6fb, #d2e1ee); line-height: 0; }
.ficha .fimg img { width: 100%; height: auto; }
.ficha .fbody { padding: .8rem 1rem 1rem; }
.ficha h3 { font-size: 1.1rem; margin: .3rem 0 .4rem; }
.ficha .def { font-size: .92rem; margin: 0 0 .6rem; }
.ficha dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .2rem .7rem; font-size: .86rem; }
.ficha dt { font-weight: 700; color: var(--muted); } .ficha dd { margin: 0; }
dialog { border: 0; padding: 0; border-radius: 18px; max-width: min(560px, calc(100vw - 20px)); width: 100%; box-shadow: 0 24px 70px rgba(8, 32, 52, .5); color: var(--ink); }
dialog::backdrop { background: rgba(8, 32, 52, .55); }
dialog .dlg-x { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; background: rgba(8, 47, 74, .9); color: #fff; width: 2.3rem; height: 2.3rem; border-radius: 50%; font-size: 1.2rem; font-weight: 800; }
dialog .pad { padding: 1.2rem; }
dialog .dlg-btns { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 350; width: min(560px, calc(100vw - 20px)); }
#toast .tt { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 14px; box-shadow: 0 10px 30px rgba(8, 32, 52, .4); background: #fff; border: 2px solid var(--line); font-size: .92rem; animation: fadein .25s; }
#toast .tt.ok { border-color: #5cc090; background: var(--ok-bg); } #toast .tt.info { border-color: #86aef0; background: var(--info-bg); }
#toast .tt.bad { border-color: #b9bec9; background: #f1f1f4; } #toast .tt.block, #toast .tt.wait { border-color: #e8b94f; background: var(--warn-bg); }
#toast .tt.danger { border-color: #e4736b; background: var(--err-bg); }
#toast .tt > div { flex: 1; } #toast b { display: block; }
#toast button { border: 0; background: transparent; font-size: 1.3rem; line-height: 1; color: #35495a; padding: 0 .25rem; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .t-grid, .b-grid { grid-template-columns: 1fr; }
  .t-bench, .b-right { position: static; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; } .hero-art { display: none; }
  .grid4 { grid-template-columns: repeat(2, 1fr); } .grid3 { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; }
  .t-head { grid-template-columns: 1fr; } .t-head > img { width: 90px; }
  .sym { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { margin-left: 0; width: 100%; } .nav a { flex: 1; text-align: center; padding: .5rem .4rem; font-size: .85rem; }
  .pill-prog { display: none; }
  .fields { grid-template-columns: 1fr; }
  .tbl.resp thead { display: none; } .tbl.resp tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; padding: .4rem .6rem; background: #fff; }
  .tbl.resp td { display: flex; justify-content: space-between; border: 0; padding: .25rem 0; } .tbl.resp td::before { content: attr(data-l); font-weight: 700; color: var(--muted); font-size: .8rem; }
}
@media (max-width: 480px) { .grid4 { grid-template-columns: 1fr 1fr; } .cat { grid-template-columns: repeat(2, 1fr); } .ctrls { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
  .slot { min-height: 112px; padding: .3rem; gap: .1rem; border-radius: 10px; }
  .slot .sl-h { font-size: .6rem; } .slot .sl-n { display: none; }
  .slot .sl-main { font-size: .6rem; padding: .1rem; } .slot .sl-main .hint { display: none; } .slot .ghost { font-size: 1.5rem; }
  .slot.filled .nm { font-size: .58rem; }
  .slot .sl-f button { font-size: .6rem; padding: .1rem .3rem; } .slot .cbadge { font-size: .58rem; right: 2px; padding: 0 5px; }
  .cat { grid-template-columns: repeat(2, 1fr); }
}
/* ---------- conta e painel do professor ---------- */
.nav a.nav-admin { display: none; } body.is-admin .nav a.nav-admin { display: inline-block; }
body.logged-out .nav, body.logged-out .pill-prog { display: none; } body.logged-out .top-in { justify-content: flex-start; }
.who { display: flex; align-items: center; gap: .6rem; margin-left: .2rem; }
.who[hidden], .sync[hidden], .pill-prog[hidden] { display: none; }
.who-n { display: flex; flex-direction: column; line-height: 1.15; text-align: right; max-width: 12rem; }
.who-n b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .who-n small { font-size: .72rem; opacity: .85; }
.who .btn.ghost { padding: .3rem .7rem; }
.sync { font-size: .74rem; border-radius: 999px; padding: .25rem .65rem; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.sync[data-st="ok"] { background: rgba(31, 184, 106, .28); } .sync[data-st="warn"] { background: rgba(255, 183, 3, .35); }
.auth-wrap { display: flex; justify-content: center; padding: 1rem 0 2rem; }
.auth { width: min(460px, 100%); } .auth > img { margin: 0 auto .2rem; }
.auth h1 { font-size: 1.35rem; text-align: center; margin: .2rem 0 .3rem; } .auth > p.muted { text-align: center; margin-top: 0; }
.auth form { display: grid; gap: .8rem; }
.auth label.f small { display: block; font-weight: 400; color: var(--muted); margin-top: .2rem; }
.auth .btn { width: 100%; padding: .7rem 1rem; font-size: 1rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; background: #e6eef5; padding: .25rem; border-radius: 12px; margin: .8rem 0 1rem; }
.tabs button { border: 0; background: transparent; padding: .55rem .4rem; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--brand-d); box-shadow: 0 1px 4px rgba(16, 48, 74, .18); }
.pw { display: flex; gap: .4rem; align-items: stretch; margin-top: .25rem; } .pw input { margin-top: 0 !important; flex: 1; min-width: 0; }
.pw-t { border: 1px solid #a8bccd; background: #fff; border-radius: 10px; padding: 0 .75rem; font: inherit; font-weight: 700; font-size: .82rem; color: var(--brand); cursor: pointer; }
.auth-err { min-height: 1.2em; margin: 0; color: var(--err); font-weight: 700; font-size: .9rem; }
.linkbtn { border: 0; background: none; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; padding: .2rem; justify-self: center; }
.auth-note { margin-bottom: 0; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .8rem; } .inline-form label { flex: 1 1 260px; }
label.f select { width: 100%; margin-top: .25rem; padding: .55rem .7rem; border: 1px solid #a8bccd; border-radius: 10px; font: inherit; background: #fff; }
label.f.sel { max-width: 380px; margin-bottom: .8rem; }
.code { font-family: var(--mono); font-weight: 800; letter-spacing: .08em; background: #eef5fb; border: 1px solid var(--line); border-radius: 8px; padding: .15rem .5rem; font-size: 1.02rem; }
.mini { display: flex; align-items: center; gap: .5rem; min-width: 130px; } .mini .bar { flex: 1; } .mini span { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.row-act { display: flex; gap: .35rem; flex-wrap: wrap; }
.hint { background: var(--warn-bg); border-radius: 10px; padding: .5rem .8rem; font-size: .92rem; }
.pwbox { text-align: center; } .pwbox code { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .12em; background: #eef5fb; padding: .4rem .9rem; border-radius: 10px; border: 1px solid var(--line); }
dialog.wide { max-width: min(860px, calc(100vw - 20px)); } dialog .pad { max-height: 86vh; overflow: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 860px) { .who-n { display: none; } .sync { font-size: .7rem; } body:not(.logged-out) .top-in { gap: .5rem; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, footer, #toast, .t-bench, .btn, .filters { display: none !important; } body { background: #fff; } }
