/* App — plan page (2026-12-03 restyle: Projeto Interativo look; tokens, buttons and the loading gate are in theme.css) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
body { -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#cv.drag { cursor: grabbing; }
button, #btn-3d { padding: 10px 14px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
#btn-3d { font: inherit; font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 8px 24px -12px rgba(0,0,0,.6); }
#btn-3d:hover { border-color: var(--line-2); }

[hidden] { display: none !important; }
#bar { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); display: flex; gap: 8px; z-index: 3; flex-wrap: wrap; justify-content: flex-end; }
#menu { position: fixed; top: calc(66px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 3; width: 250px; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); padding: 10px; }
#menu .row { display: flex; gap: 8px; margin-bottom: 8px; }
#menu .row button { flex: 1; min-height: 36px; padding: 6px; }
#layers label { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; }
#layers i { width: 12px; height: 12px; border-radius: 3px; flex: none; border: 1px solid rgba(255, 255, 255, .3); }
#info { position: fixed; left: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 13px; opacity: 0.75; z-index: 2; pointer-events: none; }
#sched { position: fixed; top: calc(66px + env(safe-area-inset-top)); left: 12px; z-index: 3; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); padding: 10px; -webkit-user-select: text; user-select: text; }
#sched .row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
#sched .row button { min-height: 36px; padding: 6px 12px; }
#sched .mk { margin-left: auto; font-size: 13px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
#sched h3 { margin: 10px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
#sched table { width: 100%; border-collapse: collapse; font-size: 13px; }
#sched th { text-align: left; opacity: .7; font-weight: 500; border-bottom: 1px solid var(--line); padding: 3px 4px; }
#sched td { padding: 4px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
#sched tr.it { cursor: pointer; } #sched tr.it:hover td { background: var(--accent-soft); }
#sched td.id { font-weight: 600; color: var(--accent); white-space: nowrap; }
#sched small { opacity: .65; }
#cv.pick { cursor: default; } #cv.pick.over { cursor: pointer; }
#room { position: fixed; top: calc(66px + env(safe-area-inset-top)); left: 12px; z-index: 3; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); padding: 12px 14px; -webkit-user-select: text; user-select: text; }
#room-x { position: absolute; top: 6px; right: 6px; min-height: 34px; padding: 2px 12px; font-size: 20px; line-height: 1; }
#room h2 { margin: 0 44px 0 0; font-size: 17px; font-weight: 650; }
#room .sub { font-size: 12px; opacity: .65; margin-bottom: 8px; }
#room h3 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
#room table { width: 100%; border-collapse: collapse; font-size: 13px; }
#room td, #room th { padding: 4px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; text-align: left; }
#room .kv th { width: 92px; font-weight: 500; opacity: .7; }
#room td.id { font-weight: 600; color: var(--accent); white-space: nowrap; width: 1%; }
#room td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#room tr.it { cursor: pointer; } #room tr.it:hover td { background: var(--accent-soft); }
#room .paint div { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
#room .sw { width: 16px; height: 16px; border-radius: 4px; flex: none; border: 1px solid rgba(255,255,255,.35); }
#room .note { font-size: 11.5px; opacity: .6; margin: 10px 0 0; }
#bar .ico { padding: 10px 12px; }
.dd { position: fixed; top: calc(66px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 4; display: flex; flex-direction: column; gap: 6px; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); padding: 8px; }
.dd button { justify-content: flex-start; min-height: 40px; }
#sel-chip, #med-chip { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#quant { position: fixed; top: calc(66px + env(safe-area-inset-top)); left: 12px; z-index: 3; width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); padding: 12px 14px; -webkit-user-select: text; user-select: text; }
#quant-x { position: absolute; top: 6px; right: 6px; min-height: 34px; padding: 2px 12px; font-size: 20px; line-height: 1; }
#quant h2 { margin: 0 44px 8px 0; font-size: 17px; font-weight: 650; }
#quant .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
#quant .row button { min-height: 36px; padding: 6px 12px; }
#q-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
#quant h3 { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
#quant table { width: 100%; border-collapse: collapse; font-size: 13px; }
#quant th { text-align: left; opacity: .7; font-weight: 500; border-bottom: 1px solid var(--line); padding: 3px 5px; }
#quant td { padding: 4px 5px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
#quant .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#quant tr.tot td { font-weight: 650; border-top: 1px solid var(--line); }
#quant tr.it { cursor: pointer; } #quant tr.it:hover td { background: var(--accent-soft); }
#quant .sw, #print .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(255,255,255,.35); }
#quant .note { font-size: 11.5px; opacity: .6; margin: 4px 0 0; }
#print { display: none; }
@media print {
  body.printing-q { overflow: visible; height: auto; background: #fff; color: #111; }
  body.printing-q > *:not(#print) { display: none !important; }
  body.printing-q #print { display: block; font: 10.5px/1.35 system-ui, "Segoe UI", sans-serif; color: #111; }
  #print h1 { font-size: 18px; margin: 0 0 2px; } #print h2 { font-size: 15px; margin: 14px 0 4px; border-bottom: 2px solid #111; padding-bottom: 2px; }
  #print section { break-before: page; } #print section:first-of-type { break-before: auto; }
  #print h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 3px; }
  #print table { width: 100%; border-collapse: collapse; break-inside: auto; } #print tr { break-inside: avoid; }
  #print th { text-align: left; border-bottom: 1px solid #555; padding: 2px 4px; font-weight: 600; }
  #print td { padding: 2px 4px; border-bottom: 1px solid #ddd; vertical-align: top; }
  #print .num { text-align: right; white-space: nowrap; } #print tr.tot td { font-weight: 700; border-top: 1px solid #555; }
  #print .note { font-size: 9.5px; color: #555; margin: 3px 0 0; } #print .sw { border-color: #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 portrait; margin: 12mm; }
}
#ov { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#cv.meas { cursor: crosshair; } #cv.meas.drag { cursor: grabbing; }
#room .vbtns { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
#room .vbtns button { min-width: 30px; padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
#room .vbtns button:hover { background: rgba(255,210,74,.25); }
#room .vbtns .note { margin: 0 0 0 4px; }
#room .vbtns button.on { background: #ffd24a; color: #222; border-color: var(--accent); }

/* 2026-12-03 theme details */
#info { font: 500 11.5px var(--mono); letter-spacing: .04em; color: var(--mute); opacity: 1; }
#sched h3, #room h3, #quant h3 { font: 500 10.5px var(--mono); letter-spacing: .1em; color: var(--accent); opacity: 1; }
.dd button { box-shadow: none; background: rgba(255,255,255,.04); }
.dd button:hover { background: var(--accent-soft); border-color: rgba(240,179,35,.4); }
#room h2, #quant h2 { font-weight: 800; letter-spacing: -.01em; }
