/* Página de trabalho IFC: a janela inteira é dedicada ao modelo. */
body.ifc-app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #F1F5F9; }
.ifc-appbar { z-index: 40; height: 62px; flex: 0 0 62px; display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid #CBD5E1; background: #fff; }
.ifc-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ifc-brand img { display: block; width: 105px; height: auto; }
.ifc-appbar-divider { width: 1px; height: 27px; background: #CBD5E1; }
.ifc-appbar-title { color: #0F172A; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; letter-spacing: -.025em; white-space: nowrap; }
.ifc-appbar-spacer { flex: 1; }
.ifc-appbar-link, .ifc-appbar-panel { flex: 0 0 auto; color: #334155; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ifc-appbar-link:hover { color: #C2410C; }
.ifc-appbar-back { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 11px; border: 1px solid #CBD5E1; border-radius: 7px; color: #0F172A; background: #F8FAFC; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ifc-appbar-back:hover { border-color: #FDBA74; color: #9A3412; background: #FFF7ED; }
.ifc-appbar-panel { padding: 7px 10px; border: 1px solid #CBD5E1; border-radius: 7px; background: #fff; }
.ifc-appbar-panel[aria-pressed="false"] { background: #FFF7ED; border-color: #FDBA74; color: #9A3412; }
.ifc-preview-notice { max-width: min(24vw, 260px); padding: 5px 9px; border: 1px solid #FED7AA; border-radius: 6px; color: #9A3412; background: #FFF7ED; font-family: 'JetBrains Mono', monospace; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifc-app-main { display: flex; width: 100%; min-height: 0; overflow: hidden; animation: none; }
.ifc-tool-shell { flex: 1; min-width: 0; min-height: 0; }
.ifc-tool-shell .ifc-workspace { width: 100%; height: 100%; max-height: none; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.ifc-tool-shell .ifc-workspace:fullscreen { width: 100%; height: 100dvh; max-height: none; }
.ifc-workspace.panel-collapsed .sidebar, .ifc-workspace.panel-collapsed .divider { display: none !important; }
.ifc-tool-shell .viewer-pane { touch-action: none; }
.ifc-gate { width: min(520px, calc(100% - 36px)); margin: auto; padding: 38px; border: 1px solid #CBD5E1; border-radius: 14px; background: #fff; box-shadow: 0 24px 60px -42px #0F172A80; }
.ifc-gate h1 { margin: 10px 0 14px; font-size: clamp(30px, 4vw, 42px); }
.ifc-gate p { margin-bottom: 24px; font-size: 14px; }
.ifc-tool-shell .stage-drop { padding: 30px; }
.ifc-tool-shell .stage-drop h2 { font-size: clamp(30px, 3vw, 42px); }
.ifc-tool-shell .dropzone { max-width: 650px; padding: clamp(32px, 5vh, 60px) 24px; }
.ifc-clip-help, .ifc-clip-box-help { margin: -4px 0 14px; color: #64748B; font-size: 12px; line-height: 1.45; }
.ifc-clip-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
.ifc-clip-mode { min-height: 42px; padding: 7px 9px; border: 1px solid #CBD5E1; border-radius: 8px; background: #F8FAFC; color: #334155; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.ifc-clip-mode span { float: right; color: #64748B; font-family: 'JetBrains Mono', monospace; }
.ifc-clip-mode:hover { border-color: #FDBA74; background: #FFF7ED; }
.ifc-clip-mode[aria-pressed="true"] { border-color: #C2410C; background: #FFF7ED; color: #9A3412; }
.ifc-clip-mode[aria-pressed="true"] span { color: #9A3412; }
.ifc-clip-plane-controls, .ifc-clip-box-controls { padding: 12px; border: 1px solid #E2E8F0; border-radius: 10px; background: #F8FAFC; }
.ifc-clip-plane-controls[hidden], .ifc-clip-box-controls[hidden] { display: none; }
.ifc-clip-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ifc-clip-heading strong { color: #0F172A; font-size: 12px; }
.ifc-clip-heading button { border: 0; background: none; color: #64748B; font-size: 11px; cursor: pointer; }
.ifc-clip-heading button:hover { color: #C2410C; }
.ifc-clip-diagram { min-height: 106px; padding: 6px; border: 1px solid #334155; border-radius: 8px; background: #111827; color: #CBD5E1; }
.ifc-clip-diagram svg { display: block; width: 100%; height: 92px; }
.ifc-clip-progress-label { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 5px; color: #475569; font-size: 11px; }
.ifc-clip-progress-label output { color: #C2410C; font-family: 'JetBrains Mono', monospace; font-weight: 600; white-space: nowrap; }
.ifc-clip-progress-row { display: flex; align-items: center; gap: 7px; }
.ifc-clip-progress-row input { flex: 1; width: 0; accent-color: #C2410C; }
.ifc-clip-progress-row button, .ifc-clip-actions button { padding: 7px; border: 1px solid #CBD5E1; border-radius: 7px; background: white; color: #334155; font-size: 11px; font-weight: 600; cursor: pointer; }
.ifc-clip-progress-row button:hover, .ifc-clip-actions button:hover { border-color: #FDBA74; background: #FFF7ED; }
.ifc-clip-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.ifc-clip-actions button[aria-pressed="true"] { border-color: #C2410C; background: #FFF7ED; color: #9A3412; }
.ifc-clip-box-help { margin: 0 0 12px; }
.ifc-clip-box-controls .clip-axis { margin-bottom: 13px; }
.ifc-clip-box-controls .clip-slider { display: block; }
@media (max-width: 850px) {
  .ifc-tool-shell .sidebar { width: 100% !important; min-width: 0; max-height: none; flex: 0 0 185px; }
  .ifc-tool-shell .viewer-pane { flex: 1; min-height: 0; }
  .ifc-tool-shell .viewer-tools { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; transform: none; justify-content: flex-start; overflow-x: auto; }
  .ifc-tool-shell .overlay-info { top: 60px; }
  .ifc-tool-shell .viewer-actions { width: calc(100% - 20px); justify-content: center; }
}
@media (max-width: 650px) {
  .ifc-appbar { height: 54px; flex-basis: 54px; gap: 9px; padding: 0 10px; }
  .ifc-brand img { width: 80px; }
  .ifc-appbar-divider { height: 22px; }
  .ifc-appbar-title { font-size: 12px; }
  .ifc-appbar-panel { padding: 6px; font-size: 11px; }
  .ifc-preview-notice, .ifc-account-link, .ifc-appbar-link { display: none; }
  .ifc-appbar-back { padding: 7px 8px; font-size: 11px; }
  .ifc-appbar-link { font-size: 11px; }
  .ifc-tool-shell .sidebar { flex-basis: 165px; }
  .ifc-tool-shell .stage-drop { padding: 18px 12px; }
  .ifc-tool-shell .stage-drop .lead { font-size: 13px; margin-bottom: 16px; }
  .ifc-tool-shell .dropzone { padding: 24px 14px; }
  .ifc-tool-shell .viewer-actions .btn { font-size: 10px; padding: 7px 8px; }
}
@media (max-width: 470px) {
  .ifc-appbar-divider, .ifc-appbar-title { display: none; }
}
@media (max-height: 560px) and (max-width: 850px) {
  .ifc-tool-shell .sidebar { flex-basis: 110px; }
  .ifc-tool-shell .sidebar-props-wrap { display: none; }
  .ifc-tool-shell .overlay-info { display: none; }
}
