/* ===================== LOGIN SCREEN ===================== */
#login-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  overflow: hidden;
}
#login-screen .login-bg-mri {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(255,255,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 50%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(ellipse 20% 30% at 22% 48%, rgba(255,255,255,0.18) 0%, transparent 30%),
    radial-gradient(ellipse 70% 80% at 78% 50%, rgba(180,220,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 78% 50%, rgba(200,230,255,0.10) 0%, transparent 40%),
    radial-gradient(ellipse 25% 35% at 76% 49%, rgba(220,240,255,0.15) 0%, transparent 28%),
    radial-gradient(ellipse 80% 90% at 50% 50%, rgba(10,20,60,0.95) 0%, rgba(0,5,20,1) 100%);
  animation: bgPulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}
#login-screen .login-bg-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,80,180,0.08) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,80,180,0.08) 40px);
  pointer-events: none;
}
@keyframes bgPulse {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}
#login-screen .login-bg-pattern {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,20,80,0.3) 0%, transparent 70%);
  pointer-events: none;
}
#login-screen .login-title {
  font-size: 36px; font-weight: 900; color: #e0eeff; letter-spacing: 5px;
  text-transform: uppercase; text-shadow: 0 2px 24px rgba(0,80,255,0.6), 0 0 60px rgba(0,100,255,0.3);
  margin-bottom: 28px; position: relative; z-index: 1; user-select: none;
}
#login-screen .login-box {
  background: linear-gradient(160deg, #e8e4f0 0%, #d8d2e0 100%);
  border: 1px solid #c0b8cc; border-radius: 2px;
  box-shadow: 0 8px 40px rgba(0,0,20,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
  width: 380px; position: relative; z-index: 1; overflow: hidden;
}
#login-screen .login-box-header {
  background: linear-gradient(to bottom, #3a6cc0, #1e4a8a); color: #fff;
  text-align: center; padding: 9px 0 7px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px; border-bottom: 2px solid #1a3a70;
}
#login-screen .login-box-version {
  background: #f0ecf6; border-bottom: 1px solid #ccc8d4;
  text-align: center; padding: 14px 20px 6px; font-size: 13px; font-weight: 700; color: #333;
}
#login-screen .login-ce {
  font-size: 22px; color: #1a4a8a; font-weight: 900;
  display: block; margin: 6px 0 4px; letter-spacing: 2px;
}
#login-screen .login-box-corp {
  font-size: 10px; color: #555; text-align: center;
  padding: 4px 20px 10px; line-height: 1.5;
  border-bottom: 1px solid #ccc8d4; background: #f0ecf6;
}
#login-screen .login-logon-label {
  text-align: center; font-size: 13px; font-weight: 600; color: #333;
  padding: 14px 0 8px; background: #e8e4f0;
}
#login-screen .login-fields {
  padding: 6px 30px 14px; background: #e8e4f0;
  display: flex; flex-direction: column; gap: 10px;
}
#login-screen .login-field-row { display: flex; align-items: center; gap: 12px; }
#login-screen .login-label {
  width: 72px; text-align: right; font-size: 13px; color: #333; flex-shrink: 0;
}
#login-screen .login-input {
  flex: 1; height: 26px; border: 1px solid #9ba8c0; border-radius: 1px;
  background: linear-gradient(to bottom, #dfe8f8, #ccd6ee);
  padding: 0 8px; font-size: 13px; color: #222; outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,80,0.15);
}
#login-screen .login-input:focus {
  border-color: #3a6cc0;
  background: linear-gradient(to bottom, #e8f0ff, #d4e0f8);
}
#login-screen .login-buttons {
  display: flex; justify-content: center; gap: 16px;
  padding: 12px 0 16px; background: #e0dbe8; border-top: 1px solid #ccc8d4;
}
#login-screen .login-btn {
  width: 90px; height: 26px;
  background: linear-gradient(to bottom, #e8e4f0, #d4cedd);
  border: 1px solid #9993a5; border-radius: 2px; font-size: 13px; color: #222;
  cursor: pointer; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; transition: background 0.15s;
}
#login-screen .login-btn:hover { background: linear-gradient(to bottom, #f0ecf8, #e0daea); }
#login-screen .login-btn:active { background: linear-gradient(to bottom, #d0ccd8, #c8c2d0); transform: translateY(1px); }
#login-screen .login-footer {
  margin-top: 20px; font-size: 10px; color: rgba(180,210,255,0.6);
  text-align: center; line-height: 1.6; position: relative; z-index: 1; max-width: 560px;
}
#login-screen .login-corner-btns {
  position: absolute; bottom: 16px; right: 20px; display: flex; gap: 6px; z-index: 1;
}
#login-screen .login-corner-btn {
  height: 24px; padding: 0 14px;
  background: linear-gradient(to bottom, #e8e4f0, #d4cedd);
  border: 1px solid #9993a5; border-radius: 2px; font-size: 12px; color: #222;
  cursor: pointer; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
#login-screen .login-corner-btn:hover { background: linear-gradient(to bottom, #f0ecf8, #e0daea); }
#login-error-msg {
  display: none; color: #ff4444; font-size: 12px; font-weight: 700;
  text-align: center; padding: 6px 0 2px; background: #e8e4f0;
}
/* ======================================================== */
/* ===================== SIMULADOR ORIGINAL ===================== */
* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; background: #777; color: #111; min-height: 100vh; overflow-y: auto; }
.app-shell { width: 98vw; max-width: 98vw; height: 90vh; max-height: 90vh; margin: 10px auto; background: #d7d2df; border: 1px solid #5b5b5b; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.workspace { display: grid; grid-template-columns: 280px 1fr; height: calc(100% - 28px); overflow: hidden; }
.topbar { height: 28px; background: linear-gradient(to bottom, #2b2b2b, #111111); color: #f1f5ff; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 12px; position: relative; z-index: 100; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-left span { cursor: pointer; padding: 0 4px; height: 28px; display: flex; align-items: center; }
.topbar-left span:hover { background: rgba(255,255,255,0.1); }
.left-panel { background: #d8d2df; border-right: 1px solid #b8b2c2; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.patient-card { padding: 10px; border-bottom: 1px solid #bbb3c5; background: #dcd6e3; }
.patient-name { font-size: 14px; font-weight: 600; color: #4a4a4a; margin-bottom: 8px; }
.patient-meta div { display: grid; grid-template-columns: 90px 1fr; margin-bottom: 4px; font-size: 12px; color: #4b4b4b; }
.patient-meta span { color: #8c8794; }
.patient-meta strong { font-weight: 600; }
.exam-panel { padding: 8px; flex: 1; min-height: 0; }
.exam-header { background: #efedf2; border: 1px solid #c3bccb; padding: 6px 8px; font-size: 12px; color: #535353; margin-bottom: 8px; font-weight:bold; }
.btn-back-exam { background: #fff; color: #333; border: 1px solid #888; border-radius: 2px; padding: 3px 8px; font-size: 11px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-back-exam:hover { background: #e6e6e6; }
.exam-list { border: 1px solid #c4bfca; background: #ece8f0; overflow: auto; height: calc(100% - 30px); }
.seq-row { display: grid; grid-template-columns: 42px 1fr 48px; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; border-bottom: 1px solid #d8d1dd; font-size: 12px; color: #4d4d4d; cursor: pointer; background-color: transparent; background-image: linear-gradient(to right, rgba(59, 113, 202, 0.25) var(--prog, 0%), transparent var(--prog, 0%)); position: relative; }
.seq-row:hover { background-color: #dcd7e3; }
.seq-row.active { background-color: #374151; color: #ffffff; font-weight: 600; background-image: linear-gradient(to right, rgba(52, 204, 94, 0.4) var(--prog, 0%), transparent var(--prog, 0%)); }
.seq-row.scanning { animation: pulseBg 1s infinite alternate; }
@keyframes pulseBg { from { opacity: 0.85; } to { opacity: 1; } }
.seq-code { color: #507ca4; }
.seq-row.active .seq-code { color: #9ca3af; }
.seq-row.planned .seq-name::before { content: '📏 '; font-size: 11px; margin-right: 2px; }
.seq-row.aborted .seq-code { color: #ff3b3b !important; font-weight: bold; }
.seq-name-input {
  background: #1a2a4a; color: #fff; border: 1px solid #3b71ca;
  font-size: 12px; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  padding: 0 4px; height: 20px; outline: none; width: 100%;
  border-radius: 2px;
}
.seq-row.pause-before { background-color: rgba(150, 150, 150, 0.35) !important; border-left: 3px solid #999 !important; }
.seq-row.pause-before .seq-name::after { content: none; }
.pause-btn {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; background: transparent; border: none;
  color: #aaa; font-size: 13px; cursor: pointer; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; transition: opacity 0.15s, color 0.15s, background 0.15s;
  z-index: 10; line-height: 1;
}
.seq-row:hover .pause-btn { opacity: 1; }
.seq-row.pause-before .pause-btn { opacity: 1; color: #ccc; }
.seq-row.pause-before .pause-btn:hover { background: rgba(200,200,200,0.2); }
.seq-row.scan-paused { animation: pausedPulse 1.2s infinite alternate; }
.seq-row.scan-paused .pause-btn { opacity: 1 !important; color: #ff9900 !important; }
@keyframes pausedPulse {
  from { background-color: rgba(150, 150, 150, 0.30); }
  to   { background-color: rgba(150, 150, 150, 0.45); }
}
.pause-btn:hover { color: #f5c400; background: rgba(245,196,0,0.15); }
/* aguardando confirmação — pulsa amarelo */
.seq-row.awaiting-confirm { animation: awaitPulse 0.9s infinite alternate; }
@keyframes awaitPulse {
  from { background-color: #7a6200; }
  to   { background-color: #a88200; }
}
.seq-row.awaiting-confirm .seq-name::after { content: ' ⏸ Aguardando...'; font-size: 11px; color: #7ab8ff; }
.seq-row.drag-over-above { border-top: 2px solid #3b71ca !important; }
.seq-row.scanned-draggable { cursor: grab; }
.viewport.vp-drop-hover { outline: 3px solid #3b71ca; outline-offset: -3px; }
.seq-row.drag-over-below { border-bottom: 2px solid #3b71ca !important; }
.seq-row.dragging { opacity: 0.4; cursor: grabbing !important; }
.seq-row .drag-handle {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  cursor: grab; background: transparent;
  border-radius: 2px 0 0 2px;
  transition: background 0.15s;
}
.seq-row:hover .drag-handle { background: rgba(59,113,202,0.35); }
.seq-row.has-subs { padding-left: 0; }
.seq-plane { text-align: right; color: #47719a; font-weight: 600; }
.seq-row.active .seq-plane { color: #93c5fd; }
.exam-progress-wrap { padding: 8px 10px 4px; border-top: 1px solid #b9b2c1; background: #ccc8d4; }
.exam-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.exam-progress-label { font-size: 10px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.exam-progress-stats { font-size: 10px; color: #777; font-weight: 600; }
.exam-progress-track { width: 100%; height: 10px; background: #aaa5b5; border-radius: 5px; overflow: hidden; border: 1px solid #9993a5; position: relative; }
.exam-progress-fill { height: 100%; width: 0%; background: linear-gradient(to right, #1a7a3c, #34cc5e); border-radius: 5px; transition: width 0.3s ease; position: relative; }
.exam-progress-fill::after { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: rgba(255,255,255,0.35); border-radius: 0 5px 5px 0; }
.exam-progress-fill.scanning-pulse { animation: examPulse 1s infinite alternate; }
@keyframes examPulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }
.exam-progress-seq { margin-top: 3px; font-size: 10px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seq-progress-track { width: 100%; height: 10px; background: #aaa5b5; border-radius: 5px; overflow: hidden; border: 1px solid #9993a5; position: relative; margin-bottom: 6px; }
.seq-progress-fill { height: 100%; width: 0%; background: linear-gradient(to right, #1a4a9a, #3b71ca); border-radius: 5px; transition: width 0.1s ease; position: relative; }
.seq-progress-fill::after { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: rgba(255,255,255,0.35); border-radius: 0 5px 5px 0; }
.seq-progress-fill.scanning-pulse { animation: examPulse 1s infinite alternate; }
.exam-progress-seq .seq-name-lbl { color: #3b71ca; font-weight: 700; }
.exam-progress-ticks { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.exam-progress-ticks span { position: absolute; top: 0; width: 1px; height: 100%; background: rgba(0,0,0,0.18); }
.scan-controls { display: flex; gap: 10px; padding: 8px 10px; border-top: 1px solid #b9b2c1; }
.btn-scan { flex: 1; height: 34px; border: none; border-radius: 5px; font-weight: 700; text-align: center; text-transform: uppercase; cursor: pointer; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.btn-scan:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.btn-scan.start { background: #3b71ca; color: #fff; }
.btn-scan.start:hover { background: #2a569d; }
.btn-scan.stop { background: #0c4a1b; color: #fff; }
.btn-scan.stop:hover { background: #062e11; }
.center-panel { display: grid; grid-template-rows: 28px 360px 1fr; min-width: 0; min-height: 0; overflow: hidden; }
.viewport-toolbar { background: #dcd6e3; border-bottom: 1px solid #b9b2bf; display: flex; align-items: center; padding: 0 10px; gap: 8px; }
.tb-btn { display: flex; align-items: center; gap: 4px; background: transparent; border: 1px solid transparent; border-radius: 2px; padding: 2px 6px; font-size: 11px; color: #333; cursor: pointer; transition: 0.2s; }
.tb-btn:hover { background: #c5c0cb; border: 1px solid #a9a1af; }
.tb-btn.hidden-mode { color: #888; }
.viewports-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #c5c0cb; padding: 2px; min-height: 0; overflow: hidden; }
/* ===================== VIEWPORT CARD COM ZOOM ===================== */
.viewport-card { background: #bfb7c6; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.viewport-toplabel, .viewport-header { height: 18px; display: flex; align-items: center; padding: 0 6px; font-size: 11px; color: #f7f7f7; background: #1c1c25; }
.viewport-toplabel { justify-content: flex-end; font-weight: 700; }
.viewport { position: relative; flex: 1; background: #000; overflow: hidden; }
.mri-img { width: 100%; height: 100%; object-fit: contain; opacity: 0.95; pointer-events: none; transition: transform 0.05s ease; transform-origin: center center; }
.fov-box { position: absolute; top: 30%; left: 30%; width: 200px; height: 200px; border: 1px solid #f09b2f; box-shadow: 0 0 2px rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; overflow: visible; cursor: move; user-select: none; touch-action: none; transform-origin: center center; z-index: 5; }
.center-target { width: 10px; height: 10px; border: 2px solid #62ff72; border-radius: 50%; pointer-events: none; }
.rotate-handle { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; background: #f09b2f; border: 2px solid #fff; border-radius: 50%; cursor: grab; z-index: 20; }
.rotate-handle:active { cursor: grabbing; background: #fff; }
.rotate-handle::after { content: ""; position: absolute; top: 15px; left: 50%; width: 2px; height: 8px; background: #f09b2f; transform: translateX(-50%); }
.resize-handle { position: absolute; background: #f09b2f; border: 1px solid #fff; z-index: 30; box-shadow: 0 0 3px rgba(0,0,0,0.6); }
.handle-right { right: -5px; top: 50%; transform: translateY(-50%); width: 8px; height: 24px; cursor: ew-resize; border-radius: 2px; }
.handle-bottom { bottom: -5px; left: 50%; transform: translateX(-50%); width: 24px; height: 8px; cursor: ns-resize; border-radius: 2px; }
.orientation { position: absolute; right: 16px; bottom: 14px; width: 48px; height: 48px; font-size: 12px; font-weight: 700; color: #ffd34a; z-index:2; }
.orientation span:nth-child(1) { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.orientation span:nth-child(2) { position: absolute; top: 50%; left: 0; transform: translateY(-50%); }
.orientation span:nth-child(3) { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
.orientation span:nth-child(4) { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.orientation::before, .orientation::after { content: ""; position: absolute; background: #34cc5e; }
.orientation::before { width: 2px; height: 26px; left: 50%; top: 11px; transform: translateX(-50%); }
.orientation::after { width: 26px; height: 2px; top: 50%; left: 11px; transform: translateY(-50%); }
/* ===================== ZOOM SLIDER VERTICAL (tablet) ===================== */
.zoom-slider-wrap {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 80px; display: flex; flex-direction: column;
  align-items: center; z-index: 15; gap: 2px;
}
.zoom-slider-track {
  width: 6px; flex: 1; background: rgba(255,255,255,0.10);
  border-radius: 3px; border: 1px solid rgba(255,255,255,0.18);
  position: relative; cursor: pointer; overflow: hidden;
}
.zoom-slider-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(59,113,202,0.55); border-radius: 3px;
  transition: height 0.1s; pointer-events: none;
}
.zoom-slider-thumb {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 10px; height: 6px; background: rgba(200,220,255,0.75);
  border-radius: 2px; border: 1px solid rgba(255,255,255,0.5);
  pointer-events: none; transition: bottom 0.1s;
}
.zoom-reset-btn {
  width: 14px; height: 14px; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22); border-radius: 2px;
  color: rgba(255,255,255,0.55); font-size: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0; transition: background 0.15s;
}
.zoom-reset-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ===================== SUBSEQUÊNCIAS ===================== */
.seq-row.sub-seq {
  padding-left: 24px;
  background-color: #2a3a52 !important;
  border-left: 3px solid #3b71ca;
  font-style: italic;
  opacity: 0.92;
}
.seq-row.sub-seq .seq-code { color: #7ab8ff !important; }
.seq-row.sub-seq .seq-name { color: #c8d8f0; }
/* Subsequências visuais no ExamCard */
.examcard-sub-item {
  display: flex; align-items: center;
  padding: 4px 12px 4px 28px;
  background: #d4dce8;
  border-bottom: 1px solid #b8c4d4;
  border-left: 3px solid #3b71ca;
  font-size: 11px; font-style: italic;
  color: #3a5a8a;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.examcard-sub-item::before { content: '↳ '; margin-right: 4px; color: #3b71ca; }
.sub-toggle-btn {
  background: transparent; border: none;
  color: #7ab8ff; font-size: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 2px; transition: color 0.15s;
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  flex-shrink: 0;
}
.sub-toggle-btn:hover { color: #fff; background: rgba(59,113,202,0.3); }
.sub-toggle-btn.expanded { color: #34cc5e; }
/* ===================== FIM SUBSEQUÊNCIAS ===================== */
.fov-center-line {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 1px;
  background: rgba(255, 180, 70, 0.9);
  pointer-events: none; z-index: 6;
  transform: translateX(-50%);
}
/* Linha tracejada horizontal de fase — aparece só no plano próprio (não escaneado) */
.fov-phase-line {
  position: absolute; left: 0; right: 0;
  top: 50%; height: 0;
  border-top: 1px dashed rgba(255, 180, 70, 0.7);
  pointer-events: none; z-index: 6;
  transform: translateY(-50%);
  display: none;
}

/* Linha central horizontal — só usada no AXI */
.fov-center-line-h {
  position: absolute; left: 0; right: 0;
  top: 50%; height: 1px;
  background: rgba(255, 180, 70, 0.9);
  pointer-events: none; z-index: 6;
  transform: translateY(-50%);
  display: none; /* oculta por padrão, ativada só no AXI */
}

/* Números — base */
.fov-slice-num {
  position: absolute;
  font-size: 9px; font-weight: 700;
  color: #f09b2f; pointer-events: none;
  z-index: 7; white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 0 2px #000;
  line-height: 1;
}

/* SAG e COR: bottom row — fora da caixa (abaixo) */
.fov-slice-num.bot-left   { bottom: -14px; left: 0px; }
.fov-slice-num.bot-center { bottom: -14px; left: 50%; transform: translateX(-50%); }
.fov-slice-num.bot-right  { bottom: -14px; right: 0px; }
/* SAG e COR: top row — fora da caixa (acima) */
.fov-slice-num.top-left   { top: -14px; left: 0px; }
.fov-slice-num.top-center { top: -14px; left: 50%; transform: translateX(-50%); }
.fov-slice-num.top-right  { top: -14px; right: 0px; }

/* AXI: lateral esquerda — fora da caixa (à esquerda) */
.fov-slice-num.axi-left-bot  { left: -16px; bottom: 0px; }
.fov-slice-num.axi-left-mid  { left: -16px; top: 50%; transform: translateY(-50%); }
.fov-slice-num.axi-left-top  { left: -16px; top: 0px; }
/* AXI: lateral direita — fora da caixa (à direita) */
.fov-slice-num.axi-right-bot { right: -16px; bottom: 0px; }
.fov-slice-num.axi-right-mid { right: -16px; top: 50%; transform: translateY(-50%); }
.fov-slice-num.axi-right-top { right: -16px; top: 0px; }

.bottom-row { display: grid; grid-template-columns: 1fr 240px; align-items: stretch; min-height: 0; height: 100%; border-top: 1px solid #b9b2bf; overflow: hidden; }
.summary-panel { display: flex; flex-direction: column; background: #d9d4df; min-width: 0; min-height: 0; overflow: hidden; }
.summary-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #c2bcc8; background: #cfc8d5; }
.summary-seq-block { flex: 1 1 120px; }
.summary-seq-title { font-size: 15px; font-weight: 700; color: #4a4a4a; }
.summary-seq-time { font-size: 12px; color: #666; margin-top: 2px; }
.summary-metrics { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; flex: 1 1 200px; }
.metric { display: flex; align-items: baseline; gap: 5px; font-size: 12px; }
.metric-label { color: #76707a; }
.metric-value { color: #4b4b4b; font-weight: 700; }
.summary-actions { display: flex; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
.mini-btn, .accept-btn, .sum-tab, .info-tab { border: 1px solid #a9a1af; background: #ece8ee; color: #555; cursor: pointer; transition: 0.2s; }
.mini-btn { width: 30px; height: 24px; }
.accept-btn { height: 24px; min-width: 74px; background: #efedf0; font-weight: bold; }
.accept-btn:hover { background: #dcd7e3; }
.summary-tabs { display: flex; gap: 2px; padding: 4px 6px 0; background: #d9d4df; border-bottom: 1px solid #bdb7c3; }
.sum-tab { height: 24px; padding: 0 12px; font-size: 12px; border-bottom: none; border-radius: 4px 4px 0 0; background: #e2dde6; color: #555; }
.sum-tab.active { background: #efedf2; font-weight:bold; color:#111; border-top: 2px solid #507ca4; }
.sum-tab.small { margin-left: auto; }
.summary-body { flex: 1; background: #efedf2; overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.summary-body .tab-content { flex: 1; min-height: 0; overflow: auto; }
.summary-body #tab-examcard { overflow: hidden; flex-direction: column; height: 100%; min-height: 0; }
.summary-body #tab-examcard.tab-active { display: flex; }
.summary-body #tab-examcard #examcard-list { flex: 1 1 0; min-height: 0; overflow-y: scroll; background: #dde3ec; }
.summary-body #tab-examcard #examcard-ok-bar { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid #a0b0c4; background: #c8d0dc; }
.tree-menu { background: #e8e4ea; height: 100%; min-height: 250px; font-family: Tahoma, sans-serif; padding-top: 4px; }
.tree-header { font-weight: bold; color: #666; padding: 6px 12px; font-size: 13px; background: #d4ced8; border-bottom: 1px solid #ccc; margin-bottom: 4px; }
.tree-folder { font-weight: bold; font-size: 13px; color: #222; padding: 6px 12px; display: flex; align-items: center; gap: 6px; cursor: default; }
.tree-item { padding: 6px 12px 6px 28px; font-size: 12px; color: #333; cursor: pointer; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid transparent; transition: background 0.1s; }
.tree-item:hover:not(.disabled) { background-color: #d9efff; border-bottom: 1px dotted #99cfff; }
.tree-item.disabled { color: #888; cursor: default; }
.tree-item.disabled:hover { background-color: #f0ecf2; }
/* ===================== SUMMARY GRID - LAYOUT PHILIPS ===================== */
.summary-grid {
  display: table;
  border-collapse: separate;
  border-spacing: 0 10px;
  width: 100%;
  padding: 4px 0;
}
.sg-row {
  display: flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #d8d3de;
  min-height: 32px;
}
.sg-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #9a96a0;
  padding: 0 8px 0 0;
  white-space: nowrap;
  width: 80px;
  flex-shrink: 0;
}
.sg-fields {
  display: flex;
  align-items: center;
  flex: 1;
}
.sg-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.field-group { display: flex; flex-direction: column; gap: 2px; }
.field-label { font-size: 10px; color: #9d98a1; white-space: nowrap; }
.field-box { height: 24px; background: #f7f6f9; border: 1px solid #ded9e3; padding: 0 6px; display: flex; align-items: center; color: #7b7780; font-size: 13px; border-radius: 0; }
.input-field { width: 100%; outline: none; font-family: inherit; background: transparent; border: none; color: inherit; font-size: inherit; }
.sg-sep { font-size: 13px; color: #aaa; align-self: flex-end; padding-bottom: 2px; }
.sg-unit { font-size: 12px; color: #9f9aa1; align-self: flex-end; padding-bottom: 2px; white-space: nowrap; }
.checkbox-wrap { display: flex; align-items: center; gap: 6px; color: #555; font-size: 13px; }
/* Linha separadora entre Gap e NSA */
.sg-divider { display: table-row; height: 4px; }
.sg-header-row { display: table-row; }
.sg-section-header {
  display: table-cell;
  font-size: 11px; font-weight: 700; color: #3a5a8a;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 14px 6px 14px;
  border-bottom: 2px solid #7a9acc;
}
/* ===== SUMMARY 2 COLUNAS ===== */
.sg-2col-layout {
  display: flex; gap: 0; width: 100%;
}
.sg-col {
  flex: 1; display: flex; flex-direction: column;
  padding: 0 12px;
  border-right: 2px solid #b0bcd0;
}
.sg-col:last-child { border-right: none; }
.sg-col-header {
  font-size: 11px; font-weight: 700; color: #3a5a8a;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 0 6px 0;
  border-bottom: 2px solid #7a9acc;
  margin-bottom: 6px;
}
.sg-col .sg-row {
  align-items: center;
  padding: 4px 0;
  min-height: 42px;
}
.sg-col .sg-label {
  padding-top: 0;
  padding-bottom: 0;
}
.sg-col .field-group {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
}
.sg-col .field-label {
  font-size: 10px; color: #9d98a1; white-space: nowrap;
  padding-left: 2px; line-height: 14px; height: 14px;
}
.sg-col .sg-inline {
  align-items: flex-end;
}
.sg-col .sg-sep,
.sg-col .sg-unit {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
@media (max-width: 1200px) { .workspace { grid-template-columns: 230px 1fr; } .bottom-row { grid-template-columns: 1fr; } .info-panel { display: none; } }
/* ===== PAINEL DIREITO: AutoView integrado ===== */
.av-panel {
  border-left: 1px solid #9e98aa;
  background: #111118;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.av-panel-tabs {
  display: flex;
  background: #b8b2c0;
  border-bottom: 2px solid #9e98aa;
  flex-shrink: 0;
  height: 26px;
}
.av-panel-tab {
  flex: 1; height: 26px; border: none;
  border-right: 1px solid #9e98aa;
  background: #c4bece; color: #4a4560;
  font-size: 11px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.3px;
  transition: background 0.15s;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.av-panel-tab:last-child { border-right: none; }
.av-panel-tab:hover { background: #d2ccda; }
.av-panel-tab.active {
  background: #efedf2; color: #1a1a2e;
  border-bottom: 2px solid #3b71ca;
  margin-bottom: -2px;
}
.av-panel-body {
  flex: 1;
  overflow: auto;
  font-size: 12px; color: #55505e; line-height: 1.5;
  min-height: 0;
}
.av-panel-body.av-autoview-body {
  padding: 0; background: #111118;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}
.av-panel-body.av-autoview-body .av-autoview-screen {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.info-panel { display: none; } /* painel antigo desativado */
.info-tabs { display: flex; gap: 3px; padding: 6px 6px 0; }
.info-tab { height: 24px; padding: 0 12px; font-size: 12px; }
.info-tab.active { background: #f2eff4; }
.info-content { margin: 0 6px 6px; padding: 10px; background: #f2eff4; border: 1px solid #d0cad4; flex: 1; overflow: auto; font-size: 12px; color: #66606c; line-height: 1.45; }
.info-title { font-weight: 700; color: #5a5560; margin-bottom: 8px; }
/* media query merged above */
.slice-slider { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); width: 80%; z-index: 10; -webkit-appearance: none; background: transparent; outline: none; opacity: 0.6; transition: opacity 0.2s; cursor: pointer; }
.slice-slider:hover, .slice-slider:active { opacity: 1; }
.slice-slider::-webkit-slider-runnable-track { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; }
.slice-slider::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #ffcc00; margin-top: -6px; box-shadow: 0 0 5px rgba(0,0,0,0.8); }
.av-tabs { display: flex; gap: 0; background: #b8b2c0; border-bottom: 2px solid #9e98aa; flex-shrink: 0; }
.av-tab { flex: 1; height: 26px; border: none; border-right: 1px solid #9e98aa; background: #c4bece; color: #4a4560; font-size: 11px; font-weight: 600; cursor: pointer; letter-spacing: 0.3px; transition: background 0.15s; }
.av-tab:last-child { border-right: none; }
.av-tab:hover { background: #d2ccda; }
.av-tab.active { background: #efedf2; color: #1a1a2e; border-bottom: 2px solid #3b71ca; margin-bottom: -2px; }
.av-body { flex: 1; overflow: auto; padding: 10px; font-size: 12px; color: #55505e; line-height: 1.5; }
.av-autoview-body { padding: 0; background: #111118; flex-direction: column; align-items: stretch; justify-content: stretch; }
.av-autoview-screen { flex: 1; background: #0a0a10; display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid #2a2a3a; overflow: hidden; }
.av-autoview-label { color: #2a2a4a; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; user-select: none; }
.av-info-title { font-weight: 700; color: #3a3548; margin-bottom: 6px; font-size: 12px; }
.av-info-text { margin: 0 0 8px; font-size: 11.5px; color: #5a5568; }
/* ===================== DROPDOWN MENU PATIENTS ===================== */
.topbar-dropdown { position: relative; }
.topbar-dropdown-menu {
  display: none; position: absolute; top: 28px; left: 0;
  background: #1a1a1a; border: 1px solid #444;
  min-width: 260px; z-index: 99999;
  box-shadow: 2px 4px 16px rgba(0,0,0,0.7);
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  border-radius: 0 0 3px 3px;
}
.topbar-dropdown-menu.open { display: block; }
.dd-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 16px; font-size: 13px; color: #e0e0e0; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dd-item:hover { background: #333; }
.dd-item.disabled { color: #666; cursor: default; }
.dd-item.disabled:hover { background: transparent; }
.dd-item .dd-key { color: #999; font-size: 12px; }
.dd-separator { height: 1px; background: rgba(255,255,255,0.1); margin: 3px 0; }
/* ===================== MODAL NEW EXAMINATION ===================== */
#modal-new-exam {
  display: none; position: fixed; inset: 0; z-index: 999999;
  background: rgba(0,0,0,0.55);
  align-items: center; justify-content: center;
}
#modal-new-exam.open { display: flex; }
.ne-modal-box {
  background: #e8edf5;
  border: 1px solid #555;
  width: 740px; max-width: 97vw;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 12px 48px rgba(0,0,40,0.5);
  border-radius: 4px; overflow: hidden;
}
.ne-titlebar {
  background: linear-gradient(to bottom, #2a2a2a, #111);
  color: #fff; padding: 6px 12px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase; border-bottom: 1px solid #444;
}
.ne-body { display: grid; grid-template-columns: 1fr 1fr; background: #e8edf5; }
.ne-col { padding: 14px 16px; }
.ne-col-left { border-right: 1px solid #c0c8d8; }
.ne-section-title {
  font-size: 11px; font-weight: 700; color: #333;
  margin-bottom: 10px; border-bottom: 2px solid #555; padding-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.ne-grid { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 6px 8px; font-size: 12px; color: #111; }
.ne-label { font-size: 12px; color: #333; }
.ne-input {
  height: 22px; border: 1px solid #aab8cc; padding: 0 6px;
  background: #f0f4fc; font-size: 12px; width: 100%;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; border-radius: 2px;
}
.ne-input:focus { outline: 1px solid #555; }
.ne-row-inline { display: flex; gap: 6px; align-items: center; }
.ne-toggle {
  height: 22px; padding: 0 10px; font-size: 11px; font-weight: 700;
  border: 1px solid #aab8cc; background: #dde4f0; cursor: pointer;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; color: #333; border-radius: 2px;
}
.ne-toggle.active-ne { background: #2a2a2a; color: #fff; border-color: #111; }
.ne-conditions-title { font-size: 11px; font-weight: 700; color: #555; margin: 14px 0 6px; }
.ne-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 8px 14px; border-top: 1px solid #c0c8d8; background: #d0daea;
}
.ne-btn {
  height: 26px; padding: 0 24px; font-size: 12px; font-weight: 700;
  border: 1px solid #999; cursor: pointer; border-radius: 2px;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.ne-btn-ok { background: #222; color: #fff; border-color: #111; }
.ne-btn-ok:hover { background: #000; }
.ne-btn-cancel { background: #e0e8f4; color: #333; }
.ne-btn-cancel:hover { background: #cdd8ec; }
.ne-date-btns { display: flex; gap: 4px; align-items: center; }
.ne-date-btn {
  height: 22px; padding: 0 8px; font-size: 11px; font-weight: 700;
  border: 1px solid #aab8cc; background: #dde4f0; cursor: pointer; border-radius: 2px;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; color: #333;
}
.ne-date-btn.active-ne { background: #222; color: #fff; border-color: #111; }

/* ===== PARAMETERS 3 COLUNAS ===== */
.param-3col-layout { display:flex; gap:0; width:100%; padding:6px 2px; }
.param-col { flex:1; display:flex; flex-direction:column; gap:0; padding:0 10px; border-right:2px solid #b0bcd0; }
.param-col:last-child { border-right:none; }
.param-col-header { font-size:11px; font-weight:700; color:#3a5a8a; text-transform:uppercase; letter-spacing:1px; padding:4px 0 6px 0; border-bottom:2px solid #7a9acc; margin-bottom:6px; }
.param-col-subheader { font-size:11px; font-weight:700; color:#7a3a5a; text-transform:uppercase; letter-spacing:1px; padding:10px 0 6px 0; border-bottom:2px solid #cc7a9a; margin-bottom:6px; margin-top:2px; }
.param-row { display:flex; align-items:center; justify-content:flex-start; padding:3px 0; border-bottom:1px solid #d0d8e4; gap:6px; }
.param-label { font-size:11px; color:#3a4a6a; width:100px; text-align:right; }
.param-disabled input { background:#e8edf4 !important; color:#888 !important; cursor:not-allowed !important; }

/* Oculta barra de info Voxel/Slices/FOV */
.summary-topline { display: none !important; }
/* ===================== ADD SCAN ITEM MODAL ===================== */
.asi-item {
  padding: 8px 14px;
  font-size: 12px;
  color: #1a2a4a;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 0.1s;
  user-select: none;
}
.asi-item:hover { background: #c8d8f0; }
.asi-item.asi-active {
  background: #2a5aaa;
  color: #fff;
  font-weight: 700;
}

/* ===================== MODAL ADD SCAN ITEM ===================== */
.asi-item {
  padding: 5px 10px;
  font-size: 11px;
  color: #1a2a4a;
  cursor: pointer;
  border-bottom: 1px solid #ccd4e4;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.asi-item:hover { background: #d4ddf0; }
.asi-item.asi-active {
  background: #2a5aaa;
  color: #fff;
  font-weight: 600;
}
.asi-item.asi-active span { color: #c0d4ff !important; }

/* ===================== BARRA DE FERRAMENTAS ===================== */
#app-toolbar {
  width: 1360px; max-width: 98vw;
  margin: 6px auto 0;
  background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
  border: 1px solid #444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.atb-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 4px 14px; height: 40px; min-width: 72px;
  background: transparent; border: 1px solid transparent;
  border-radius: 4px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  color: #ddd;
}
.atb-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.atb-btn:active { background: rgba(255,255,255,0.14); }
.atb-icon { font-size: 16px; line-height: 1; }
.atb-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; white-space: nowrap; color: #ccc; }
.atb-divider {
  width: 1px; height: 30px; background: rgba(255,255,255,0.12);
  margin: 0 8px; flex-shrink: 0;
}
.atb-disabled { opacity: 0.35; cursor: not-allowed; }
.atb-disabled:hover { background: transparent !important; border-color: transparent !important; }
/* ===== FILA - linha de paciente ===== */
.fila-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 2fr;
  padding: 9px 14px; font-size: 12px; color: #1a2a4a;
  border-bottom: 1px solid #ccd4e4; cursor: pointer;
  transition: background 0.1s; align-items: center;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.fila-row:hover { background: #d8e2f4; }
.fila-row:last-child { border-bottom: none; }
.fila-name { font-weight: 700; }
.fila-id { color: #7a8a9a; font-size: 11px; }
.fila-age { color: #4a5a6a; }
.fila-exam { color: #2a4a8a; font-weight: 600; font-size: 11px; }

/* ===================== MPR ===================== */
.tb-btn-mpr { font-weight: 700; letter-spacing: 0.5px; }
.mpr-disabled { opacity: 0.3; cursor: not-allowed !important; }
.mpr-disabled:hover { background: transparent !important; border-color: transparent !important; }
.mpr-active { background: #0d2a4a !important; color: #7ab8ff !important; border-color: #3b71ca !important; opacity: 1 !important; }

/* Painel de parâmetros MPR */
.mpr-panel-inner { padding: 16px 14px; display: flex; flex-direction: column; gap: 0; }

/* Grupo de parâmetro */
.mpr-param-group {
  margin-bottom: 20px;
}
.mpr-group-label {
  font-size: 9px; font-weight: 800; color: #5a9adf;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #333;
  display: flex; align-items: center; gap: 6px;
}
.mpr-group-label::before {
  content: ''; display: inline-block; width: 3px; height: 10px;
  background: #3b71ca; border-radius: 2px; flex-shrink: 0;
}
.mpr-param-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 8px;
}
.mpr-param-row:last-child { border-bottom: none; }
.mpr-param-label {
  font-size: 11px; color: #aaa; flex: 1; white-space: nowrap;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}
.mpr-param-value {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.mpr-input {
  height: 28px; background: #111; border: 1px solid #3a3a3a;
  color: #e0e0e0; font-size: 12px; font-weight: 600;
  padding: 0 8px; outline: none; text-align: center;
  font-family: 'Courier New', monospace;
  width: 62px; border-radius: 4px; transition: all 0.2s;
}
.mpr-input:focus { border-color: #3b71ca; color: #fff; background: #0a0a20; box-shadow: 0 0 0 2px rgba(59,113,202,0.2); }
.mpr-stepper {
  width: 24px; height: 28px; background: #333; border: 1px solid #444;
  color: #aaa; font-size: 14px; cursor: pointer; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: Segoe UI, Tahoma, sans-serif; transition: all 0.15s; flex-shrink: 0;
}
.mpr-stepper:hover { background: #3b71ca; color: #fff; border-color: #3b71ca; }
.mpr-stepper:active { background: #1a3a7a; color: #fff; }
.mpr-radio-group { display: flex; gap: 4px; }
.mpr-radio-pill {
  flex: 1; height: 26px; border: 1px solid #3a3a3a; background: #1a1a1a;
  color: #777; font-size: 10px; font-weight: 700; cursor: pointer;
  border-radius: 4px; letter-spacing: 0.5px; transition: all 0.15s;
  font-family: Segoe UI, Tahoma, sans-serif; text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.mpr-radio-pill:hover { background: #2a2a2a; color: #ccc; }
.mpr-radio-pill.active { background: #1a3060; color: #7ab8ff; border-color: #3b71ca; }
.mpr-select {
  height: 28px; background: #111; border: 1px solid #3a3a3a;
  color: #ccc; font-size: 11px; padding: 0 8px; outline: none;
  font-family: Segoe UI, Tahoma, sans-serif; border-radius: 4px;
  cursor: pointer; width: 100%;
}
.mpr-select:focus { border-color: #3b71ca; }
.mpr-checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #aaa; cursor: pointer;
  font-family: Segoe UI, Tahoma, sans-serif; padding: 4px 0;
}
.mpr-checkbox input { accent-color: #3b71ca; width: 13px; height: 13px; }
.mpr-orient-btn {
  flex:1; height: 32px; border: 1px solid #3a3a3a; background: #1a1a1a;
  color: #777; font-size: 11px; font-weight: 700; cursor: pointer; border-radius: 4px;
  letter-spacing: 1.5px; transition: all 0.2s; font-family: Segoe UI, Tahoma, sans-serif;
}
.mpr-orient-btn:hover { background: #2a2a2a; color: #ccc; border-color: #555; }
.mpr-orient-btn.active {
  background: linear-gradient(135deg, #1a3a6a, #0d1f40);
  color: #7ab8ff; border-color: #3b71ca;
  box-shadow: 0 0 10px rgba(59,113,202,0.3);
}
.mpr-divider {
  height: 1px; background: linear-gradient(to right, transparent, #333, transparent);
  margin: 14px 0;
}
.mpr-angle-display {
  font-size: 18px; font-weight: 700; color: #7ab8ff;
  font-family: 'Courier New', monospace; letter-spacing: 1px;
  text-align: center; padding: 4px 0;
}

/* Badges dos viewports */
.mpr-vp-badge {
  position: absolute; top: 6px; left: 8px; z-index: 4;
  font-size: 10px; font-weight: 700; color: #ff4444;
  letter-spacing: 2px; pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  font-family: 'Courier New', monospace;
}

/* Slider */
.mpr-slider {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 88%; z-index: 10; -webkit-appearance: none;
  background: transparent; outline: none; opacity: 0.65; transition: opacity 0.2s; cursor: pointer;
}
.mpr-slider:hover { opacity: 1; }
.mpr-slider::-webkit-slider-runnable-track { height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px; }
.mpr-slider::-webkit-slider-thumb { -webkit-appearance: none; height: 14px; width: 14px; border-radius: 50%; background: #ffcc00; margin-top: -5.5px; box-shadow: 0 0 6px rgba(0,0,0,0.8); }
/* ===================== MPR ZOOM BAR & WINDOWING ===================== */
#mpr-zoom-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: slider-vertical;
  appearance: auto;
  width: 18px;
  height: 120px;
  cursor: pointer;
  accent-color: #3b71ca;
  opacity: 0.85;
  transition: opacity 0.2s;
}
#mpr-zoom-slider:hover { opacity: 1; }

#mpr-reset-ball:active { transform: scale(0.92) !important; }

#mpr-zoom-bar-wrap {
  pointer-events: auto;
  user-select: none;
}

#mpr-btn-windowing:hover {
  border-color: #3b71ca !important;
  color: #7ab8ff !important;
}

/* ===================== MODULE SELECTION SCREEN ===================== */
#module-selection-screen {
  position: fixed; inset: 0;
  display: none; flex-direction: column; align-items: center;
  z-index: 9998; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  overflow-y: auto;
  padding-bottom: 30px;
}
.ms-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(0,60,180,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 80% 50%, rgba(0,80,200,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 90% at 50% 50%, rgba(10,20,60,0.97) 0%, rgba(0,5,20,1) 100%);
  animation: bgPulse 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.ms-bg-grid {
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,80,180,0.06) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,80,180,0.06) 40px);
  pointer-events: none;
  z-index: 0;
}
.ms-header {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 28px 0 0;
  font-size: 22px; font-weight: 900; color: #c8dcff;
  letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,80,255,0.5);
}
.ms-title {
  position: relative; z-index: 1;
  font-size: 26px; font-weight: 900; color: #e0ecff;
  letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,60,200,0.4);
  margin-top: 22px; text-align: center;
}
.ms-subtitle {
  position: relative; z-index: 1;
  font-size: 13px; color: #8aaccc; letter-spacing: 0.5px;
  margin-top: 8px; margin-bottom: 32px;
}
.ms-cards {
  position: relative; z-index: 1;
  display: flex; gap: 22px; align-items: flex-start;
  flex-wrap: wrap; justify-content: center;
  padding: 0 20px;
}
.ms-card {
  width: 280px; min-height: 460px;
  border-radius: 12px; padding: 24px 20px 20px;
  display: flex; flex-direction: column; align-items: center;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ms-card-active {
  background: linear-gradient(160deg, #2a1a5a 0%, #1a0e3a 60%, #100a28 100%);
  border: 1px solid rgba(120,80,220,0.5);
  box-shadow: 0 8px 40px rgba(80,40,180,0.4), 0 0 0 1px rgba(120,80,220,0.15);
}
.ms-card-active:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 50px rgba(80,40,180,0.55), 0 0 0 1px rgba(140,100,240,0.3);
}
.ms-card-dev {
  background: linear-gradient(160deg, #0e1830 0%, #080f20 100%);
  border: 1px solid rgba(60,100,160,0.35);
  box-shadow: 0 4px 20px rgba(0,20,60,0.4);
  opacity: 0.75;
}
.ms-card-badge {
  position: absolute; top: 14px; right: -22px;
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 30px; transform: rotate(35deg);
  text-transform: uppercase;
}
.ms-badge-beta {
  background: rgba(80,180,80,0.85); color: #fff;
}
.ms-badge-dev {
  background: rgba(60,140,200,0.75); color: #fff;
  font-size: 7px; padding: 3px 26px;
}
.ms-card-check {
  position: absolute; top: 12px; left: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #3aaa3a; color: #fff;
  font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,180,0,0.4);
}
.ms-card-icon {
  margin: 6px 0 10px;
  filter: drop-shadow(0 2px 12px rgba(100,140,255,0.3));
}
.ms-card-title {
  font-size: 13px; font-weight: 900; color: #d0e4ff;
  letter-spacing: 1px; text-align: center; text-transform: uppercase;
  margin-bottom: 14px; line-height: 1.4;
}
.ms-card-dev .ms-card-title {
  color: #7090b0;
}
.ms-card-features {
  list-style: disc; padding-left: 18px;
  font-size: 11px; color: #9ab8d8; line-height: 1.8;
  margin: 0 0 14px; width: 100%;
}
.ms-card-dev .ms-card-features {
  color: #4a6080;
}
.ms-card-img-preview {
  margin: 8px 0 14px;
  border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(80,120,200,0.3);
  box-shadow: 0 2px 12px rgba(0,20,80,0.5);
}
.ms-btn-start {
  width: 100%; height: 40px;
  border: none; border-radius: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  margin-top: auto;
  background: linear-gradient(to bottom, #3aaa3a, #228822);
  color: #fff;
  box-shadow: 0 3px 16px rgba(0,160,0,0.35);
}
.ms-btn-start:hover {
  background: linear-gradient(to bottom, #44cc44, #2a9a2a);
  box-shadow: 0 4px 22px rgba(0,200,0,0.45);
  transform: translateY(-1px);
}
.ms-btn-start:active { transform: translateY(0); }
.ms-btn-disabled {
  background: rgba(40,60,100,0.5) !important;
  color: rgba(120,160,200,0.5) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  border: 1px solid rgba(60,100,160,0.3);
}
.ms-footer {
  position: relative; z-index: 1;
  margin-top: 32px; text-align: center;
  font-size: 11px; color: #3a5070; line-height: 1.7;
}

.seq-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seq-plane { white-space: nowrap; overflow: hidden; }
