/**
 * ==============================================================================
 * OrthoMetry - Feature B: Digital Landmark Cephalometric Tracer Styles
 * High-contrast luxury clinical dark theme (Obsidian Slate #0B0F17 / Titanium Card #131B28)
 * Frosted loupe styling with crosshairs, luminous landmark pins (Teal / Amber / Cyan)
 * ==============================================================================
 */

/* -------------------------------------------------------------------------
 * Executive Launcher Card in #tab-cephalometrics
 * ------------------------------------------------------------------------- */
.ceph-tracer-launcher-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(19, 27, 40, 0.95) 0%, rgba(14, 20, 31, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.ceph-tracer-launcher-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #38bdf8 0%, #2dd4bf 100%);
}

.ceph-launcher-visual {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ceph-launcher-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.ceph-launcher-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ceph-launcher-text h3 .ceph-badge-new {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(45, 212, 191, 0.18);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ceph-launcher-text p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.ceph-launcher-action {
  flex-shrink: 0;
}

.btn-launch-tracer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-launch-tracer:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
  transform: translateY(-1px);
}

.btn-launch-tracer:active {
  transform: translateY(0);
}

/* -------------------------------------------------------------------------
 * Cephalometric Tracer Modal Window (Titanium Slate Full Overlay)
 * ------------------------------------------------------------------------- */
.ceph-tracer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 15, 0.92);
  backdrop-filter: blur(10px);
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ceph-tracer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ceph-tracer-modal {
  width: 96vw;
  height: 94vh;
  max-width: 1720px;
  max-height: 1020px;
  background: #0B0F17;
  border: 1px solid #1E293B;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Header */
.ceph-tracer-header {
  height: 58px;
  background: #131B28;
  border-bottom: 1px solid #1E293B;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.ceph-tracer-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ceph-tracer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ceph-tracer-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.2px;
}

.ceph-patient-pill {
  font-size: 12px;
  font-weight: 500;
  background: #1A2436;
  border: 1px solid #222F44;
  padding: 3px 10px;
  border-radius: 6px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ceph-patient-pill strong {
  color: #38bdf8;
}

.ceph-stage-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ceph-tracer-header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ceph-guided-step-banner {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ceph-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: cephPulse 2s infinite ease-in-out;
}

@keyframes cephPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.ceph-step-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.ceph-step-label span {
  color: #38bdf8;
  font-weight: 700;
}

.ceph-tracer-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-tracer-header {
  background: #1A2436;
  color: #e2e8f0;
  border: 1px solid #222F44;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-tracer-header:hover {
  background: #222F44;
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-tracer-header.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.btn-tracer-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #1A2436;
  border: 1px solid #222F44;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tracer-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Tracer Main Workspace (Canvas + HUD Grid)
 * ------------------------------------------------------------------------- */
.ceph-tracer-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 390px;
  overflow: hidden;
  position: relative;
}

/* Left: Canvas Container */
.ceph-canvas-pane {
  background: #070A0F;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Background Subtle Grid */
.ceph-canvas-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

#cephCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Floating Canvas Toolbar (Top-Left) */
.ceph-canvas-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(19, 27, 40, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.btn-canvas-tool {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.btn-canvas-tool:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-canvas-tool.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.ceph-tool-separator {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

/* Floating Image Adjustments Popover */
.ceph-adjust-popover {
  position: absolute;
  top: 56px;
  left: 14px;
  z-index: 25;
  background: #131B28;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 12px 14px;
  width: 220px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ceph-adjust-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ceph-adjust-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.ceph-adjust-slider {
  width: 100%;
  accent-color: #38bdf8;
  height: 4px;
  background: #1E293B;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

/* Canvas Status Bar (Bottom-Left) */
.ceph-canvas-statusbar {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ceph-status-pill {
  background: rgba(19, 27, 40, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ceph-status-pill strong {
  color: #e2e8f0;
}

.ceph-status-warn {
  color: #fbbf24;
}

/* Scale Calibration Alert Bar */
.ceph-calibration-alert {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 22;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  animation: cephAlertPulse 2s infinite ease-in-out;
}

@keyframes cephAlertPulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.4); }
  50% { border-color: rgba(245, 158, 11, 0.9); }
}

/* Interactive Scale Calibration Bar */
.ceph-calibration-bar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 22;
  background: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 10px 12px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-width: calc(100% - 28px);
}

.ceph-calib-prompt {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  line-height: 1.35;
}

.ceph-calib-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ceph-calib-presets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(19, 27, 40, 0.9);
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 2px;
}

.ceph-calib-preset {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ceph-calib-preset:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.ceph-calib-preset.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.ceph-calib-custom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.ceph-calib-custom-input {
  width: 54px;
  background: #131b28;
  border: 1px solid #1e293b;
  border-radius: 5px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  outline: none;
  text-align: center;
}

.ceph-calib-custom-input:focus {
  border-color: #f59e0b;
}

.ceph-calib-sn-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ceph-calib-sn-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.ceph-calib-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

.ceph-calib-cancel:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

/* -------------------------------------------------------------------------
 * 2.5x Floating Magnification Loupe (Sub-Pixel Accuracy Reticle)
 * ------------------------------------------------------------------------- */
.ceph-loupe-container {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  box-shadow: 
    0 12px 36px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(56, 189, 248, 0.6),
    inset 0 0 16px rgba(0, 0, 0, 0.5);
  border: 2px solid #38bdf8;
  background: #000000;
  display: none;
  transform: translate(24px, 24px);
  transition: opacity 0.15s ease;
}

.ceph-loupe-container.active {
  display: block;
}

#cephLoupeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Loupe Floating Label */
.ceph-loupe-tag {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 15, 23, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
}

/* Empty State / Image Upload Dropzone */
.ceph-empty-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: rgba(19, 27, 40, 0.6);
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  max-width: 480px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.ceph-empty-dropzone:hover,
.ceph-empty-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(19, 27, 40, 0.85);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
}

.ceph-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.ceph-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.ceph-empty-hint {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
 * Right: Live KPI HUD Panel (Titanium Card #131B28)
 * ------------------------------------------------------------------------- */
.ceph-hud-pane {
  background: #131B28;
  border-left: 1px solid #1E293B;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hero Skeletal Classification Banner */
.ceph-hero-card {
  padding: 16px;
  background: linear-gradient(180deg, #182232 0%, #131B28 100%);
  border-bottom: 1px solid #1E293B;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ceph-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ceph-hero-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
}

.ceph-hero-class-badge {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ceph-hero-class-badge.class-i {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.ceph-hero-class-badge.class-ii {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.ceph-hero-class-badge.class-iii {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

.ceph-hero-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

/* Scrollable HUD Content */
.ceph-hud-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ceph-hud-scrollable::-webkit-scrollbar {
  width: 6px;
}

.ceph-hud-scrollable::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 3px;
}

/* Live Measurements Grid */
.ceph-hud-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ceph-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ceph-metric-card {
  background: #0E141F;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.15s ease;
}

.ceph-metric-card:hover {
  border-color: #2dd4bf;
  background: #111a28;
}

.ceph-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ceph-metric-name {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.ceph-metric-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.ceph-metric-status-badge.norm {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.ceph-metric-status-badge.high {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.ceph-metric-status-badge.low {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.ceph-metric-status-badge.pending {
  background: rgba(100, 116, 139, 0.2);
  color: #64748b;
}

.ceph-metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ceph-metric-val {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.ceph-metric-unit {
  font-size: 11px;
  color: #64748b;
}

.ceph-metric-norm {
  font-size: 10px;
  color: #64748b;
}

/* Guided Landmark Checklist & Category Tabs */
.ceph-category-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  background: #0B0F17;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #1E293B;
}

.ceph-cat-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  white-space: nowrap;
}

.ceph-cat-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.ceph-cat-tab.active {
  background: #1A2436;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ceph-landmarks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ceph-landmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0E141F;
  border: 1px solid #1E293B;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ceph-landmark-item:hover {
  background: #162030;
  border-color: #38bdf8;
}

.ceph-landmark-item.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  box-shadow: inset 2px 0 0 #38bdf8;
}

.ceph-landmark-item.placed {
  border-color: rgba(45, 212, 191, 0.35);
}

.ceph-landmark-item.needs-verify {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.ceph-landmark-approx-warn {
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  line-height: 1.3;
}

.ceph-landmark-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ceph-landmark-pin-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
}

.ceph-landmark-name {
  font-weight: 600;
  color: #e2e8f0;
}

.ceph-landmark-coords {
  font-size: 10px;
  font-family: monospace;
  color: #64748b;
}

.ceph-landmark-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ceph-landmark-cat-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.ceph-landmark-cat-badge.skeletal {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.ceph-landmark-cat-badge.dental {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
}

.ceph-landmark-cat-badge.soft-tissue {
  background: rgba(251, 113, 133, 0.12);
  color: #fb7185;
}

.ceph-landmark-status-icon {
  font-size: 12px;
}

/* Per-point remove button (rendered only for placed landmarks) */
.ceph-landmark-remove {
  width: 18px;
  height: 18px;
  line-height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ceph-landmark-remove:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.08);
}

/* HUD Footer Actions */
.ceph-hud-footer {
  padding: 14px 16px;
  background: #101723;
  border-top: 1px solid #1E293B;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sync-eastman {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
  transition: all 0.2s ease;
}

.btn-sync-eastman:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.5);
  transform: translateY(-1px);
}

.ceph-hud-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save-tracing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1A2436;
  color: #e2e8f0;
  border: 1px solid #222F44;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-tracing:hover {
  background: #222F44;
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-clear-landmarks {
  background: #1A2436;
  color: #94a3b8;
  border: 1px solid #222F44;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-landmarks:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

/* Save status tag in HUD */
.ceph-save-tag {
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

/* ===== Multi-Analysis Selector (Feature: Multi-Analysis Tracing) ===== */
.ceph-analysis-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px;
  margin-bottom: 10px;
  background: #0B0F17;
  border: 1px solid #1E293B;
  border-radius: 10px;
}

.ceph-analysis-selector .ceph-analysis-pill {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ceph-analysis-selector .ceph-analysis-pill:hover {
  color: #e2e8f0;
  background: #1A2436;
}

.ceph-analysis-selector .ceph-analysis-pill.active {
  background: #1A2436;
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.ceph-analysis-context-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #131B28;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.ceph-analysis-context-bar label {
  color: #cbd5e1;
  font-weight: 600;
}

.ceph-analysis-context-bar select {
  background: #0E141F;
  border: 1px solid #1E293B;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 3px 6px;
  font-size: 11px;
  font-family: inherit;
}

.ceph-analysis-context-bar input[type="number"],
.ceph-analysis-context-bar input {
  background: #0E141F;
  border: 1px solid #1E293B;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 3px 6px;
  font-size: 11px;
  font-family: inherit;
  width: 64px;
}

.ceph-analysis-context-bar input:focus {
  border-color: #38bdf8;
  outline: none;
}

.ceph-analysis-context-bar .ceph-analysis-hint {
  color: #94a3b8;
}

.ceph-analysis-context-bar .ceph-analysis-hint.warn {
  color: #fbbf24;
}

@media (max-width: 480px) {
  .ceph-analysis-selector {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .ceph-analysis-selector .ceph-analysis-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* -------------------------------------------------------------------------
 * CEPHA29 Local AI Auto-Detect Button, Floating Banner & Checklist Badges
 * ------------------------------------------------------------------------- */
.ceph-hud-ai-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.btn-tracer-ai {
  flex: 1.3;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-tracer-ai-undo {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #1A2436;
  color: #94a3b8;
  border: 1px solid #222F44;
  transition: all 0.2s ease;
}

.btn-tracer-ai-undo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-tracer-ai-undo.has-undo {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
}

.btn-tracer-ai-undo.has-undo:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.26);
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}

.btn-tracer-ai:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

.btn-tracer-ai:active {
  transform: translateY(0);
}

.btn-tracer-ai.loading {
  opacity: 0.85;
  pointer-events: none;
  animation: cephAiPulse 1.4s ease-in-out infinite;
}

@keyframes cephAiPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(45, 212, 191, 0.25);
    border-color: rgba(45, 212, 191, 0.5);
  }
  50% {
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
    border-color: #38bdf8;
  }
}

.ceph-landmark-item .ceph-ai-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.ceph-landmark-item .ceph-ai-badge.low-conf {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}
