/* Web UI Overlay (matches Android Light Architectural CAD HUD) */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #F8FAFC 0%, #E0F2FE 55%, #EEF4FB 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }
.splash-card { text-align: center; }
.splash-logo {
  width: 96px; height: 96px; margin: 0 auto 18px;
  background: #fff; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.18);
}
.splash-card h1 { font-size: 24px; color: #0F172A; font-weight: 800; }
.splash-sub { font-size: 13px; color: #0284C7; font-weight: 600; margin-top: 4px; }
.splash-bar { width: 180px; height: 5px; background: #BAE6FD; border-radius: 99px; margin: 22px auto 0; overflow: hidden; }
.splash-bar-fill { width: 100%; height: 100%; background: #0284C7; animation: loadbar 1.1s ease forwards; }
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.splash-credit { position: fixed; bottom: 26px; font-size: 12px; font-weight: 700; color: #475569; letter-spacing: 0.5px; }

#top-hud {
  position: fixed;
  top: 6px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.hud-main-card, .hud-chips-row { pointer-events: auto; }

.hud-main-card {
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid #BAE6FD;
  border-radius: 15px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
.hud-school-info { cursor: pointer; }
#hud-school-name { font-size: 14px; font-weight: 800; color: #0F172A; }
#hud-kdb-stats { font-size: 11px; font-weight: 700; color: #059669; }

.btn-gradient {
  border: none;
  background: linear-gradient(90deg, #0284C7, #06B6D4);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}

.hud-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.chip {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.chip-active {
  background: linear-gradient(90deg, #0284C7, #0EA5E9);
  border-color: #0284C7;
  color: #FFFFFF;
}
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.badge-warn {
  background: #DC2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

#bottom-dock {
  position: fixed;
  bottom: 6px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.dock-pill, .del-vertex-pill { pointer-events: auto; }
.dock-pill {
  background: rgba(252, 254, 255, 0.96);
  border: 1px solid #BAE6FD;
  border-radius: 18px;
  padding: 4px 8px;
  display: flex;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.dock-item {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #0F172A;
}
.dock-item span { font-size: 15px; line-height: 1.1; }
.dock-item small { font-size: 10px; font-weight: 600; }
.dock-item.active {
  background: linear-gradient(180deg, #0284C7, #0EA5E9);
  color: #FFFFFF;
}
.del-vertex-pill {
  border: none;
  background: #DC2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
}

#inspector-card {
  position: fixed;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 20px));
  z-index: 22;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #CBD5E1;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.insp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.insp-title { font-size: 14px; font-weight: 800; color: #0F172A; }
.insp-subtitle { font-size: 11px; font-weight: 600; color: #0284C7; }
.insp-actions { display: flex; gap: 6px; }
.icon-btn { border: none; background: #F1F5F9; color: #334155; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-weight: 700; }
.icon-btn.danger { color: #DC2626; background: #FEE2E2; }

.insp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.insp-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.insp-row input[type=range] { flex: 1; accent-color: #0284C7; }
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: #EEF4FB; border: 1px solid #CBD5E1; border-radius: 9px; padding: 3px 6px;
}
.stepper button { border: none; background: transparent; color: #0284C7; font-size: 15px; font-weight: 800; cursor: pointer; padding: 0 5px; }
.stepper span { font-size: 11px; font-weight: 700; color: #0F172A; cursor: pointer; }
.insp-cond-row { display: flex; gap: 6px; }
.cond-chip {
  border: 1px solid #CBD5E1; background: #fff; color: #475569;
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.cond-chip.active { background: #D1FAE5; border-color: #059669; color: #065F46; }
.insp-style-row { display: flex; align-items: center; gap: 4px; margin-top: 5px; overflow-x: auto; }
.insp-style-row small { font-size: 10px; font-weight: 700; color: #475569; min-width: 38px; }
.style-chip {
  border: 1px solid #CBD5E1; background: #F8FAFC; color: #334155;
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.style-chip.active { background: #E0F2FE; border-color: #0284C7; color: #0369A1; font-weight: 700; }

#modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
#modal-box {
  width: min(620px, 100%);
  max-height: 85vh;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h2 { font-size: 16px; color: #0F172A; }
#modal-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.catalog-item {
  background: #EEF4FB; border: 1px solid #CBD5E1; border-radius: 12px;
  padding: 10px; cursor: pointer; text-align: left;
}
.catalog-item:hover { border-color: #0284C7; background: #E0F2FE; }
.catalog-item strong { display: block; font-size: 12px; color: #0F172A; }
.catalog-item span { display: block; font-size: 11px; color: #0284C7; font-weight: 600; margin-top: 2px; }
.catalog-item small { display: block; font-size: 10px; color: #64748B; margin-top: 2px; }

.btn-primary {
  border: none; background: #0284C7; color: #fff; font-weight: 700; font-size: 12px;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; width: 100%;
}
.btn-emerald { background: #059669; }
.btn-danger { background: #DC2626; }
.btn-outline {
  border: 1px solid #0284C7; background: #fff; color: #0284C7; font-weight: 700; font-size: 12px;
  padding: 9px 14px; border-radius: 10px; cursor: pointer; width: 100%;
}
.form-input {
  width: 100%; padding: 8px 10px; border: 1px solid #CBD5E1; border-radius: 9px; font-size: 13px;
}
.form-row { display: flex; gap: 8px; }
.proj-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; background: #EEF4FB; border: 1px solid #CBD5E1; border-radius: 10px; cursor: pointer;
}
.proj-row.active { border-color: #0284C7; background: #E0F2FE; }

#toast {
  position: fixed; bottom: 68px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #0F172A; color: #fff; font-size: 12px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

