/* ── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --gold: #C9A84C;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --gold-border: rgba(201, 168, 76, 0.35);
  --surface: #141414;
  --surface-2: #1e1e1e;
  --surface-3: #282828;
  --border: rgba(255,255,255,0.08);
  --text: #e8e8e8;
  --text-muted: #888;
}

/* ── BASE ──────────────────────────────────────────────────────────────────── */
body {
  background: #0d0d0d;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── NAVBAR ────────────────────────────────────────────────────────────────── */
.navbar {
  background: #0a0a0a !important;
  border-bottom: 1px solid var(--gold-border) !important;
}

/* ── COLORS ────────────────────────────────────────────────────────────────── */
.text-gold { color: var(--gold) !important; }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0a;
  font-weight: 600;
}
.btn-gold:hover {
  background: #d4b05a;
  border-color: #d4b05a;
  color: #0a0a0a;
}
.btn-outline-gold {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline-gold:hover {
  background: var(--gold-dim);
  color: var(--gold);
}
.btn-outline-gold.active-btn {
  background: var(--gold);
  color: #0a0a0a;
}
.border-gold { border-color: var(--gold-border) !important; }

/* ── CARDS ─────────────────────────────────────────────────────────────────── */
.card-dark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card-dark .card-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}
.card-dark .card-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
}

/* ── FORMS ─────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--surface-3);
  border-color: var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { color: #aaa; font-size: 0.85rem; margin-bottom: 4px; }

/* ── ACCORDION ─────────────────────────────────────────────────────────────── */
.accordion-button:not(.collapsed) {
  background: var(--surface-2);
  color: var(--gold);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }
.accordion-button::after {
  filter: invert(1);
}

/* ── UPLOAD ZONE ───────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gold-border);
  background: var(--gold-dim);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--gold);
  background: rgba(201,168,76,0.2);
}

/* ── SCENE LIST ─────────────────────────────────────────────────────────────── */
.scene-item {
  transition: background 0.15s;
  cursor: default;
}
.scene-item:hover { background: var(--surface-2); }
.scene-item.active { background: rgba(201,168,76,0.08); border-left: 3px solid var(--gold) !important; }
.scene-item:last-child { border-bottom: none !important; }
.scene-item.oculta { opacity: 0.45; }
.scene-item.oculta .scene-nome { text-decoration: line-through; }

.btn-xs {
  padding: 3px 7px;
  font-size: 11px;
  border-radius: 4px;
}

/* ── PROGRESS BAR ───────────────────────────────────────────────────────────── */
.bg-gold { background-color: var(--gold) !important; }

/* ── PANNELLUM OVERRIDES ────────────────────────────────────────────────────── */
.pnlm-container { background: #000 !important; }
.pnlm-load-box { background: #0a0a0a !important; border: none !important; }
.pnlm-load-box p { color: var(--gold) !important; }
.pnlm-lbar { background: var(--gold) !important; }
/* Pannor já exibe o nome do cômodo em #tour-room-name — ocultar o título nativo */
.pnlm-title-box { display: none !important; }

/* Admin hotspot markers */
.pannor-hotspot-edit {
  background: rgba(201,168,76,0.7);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 20px !important;
  height: 20px !important;
  margin-left: -10px !important;
  margin-top: -10px !important;
}

/* Public tour hotspots */
.pannor-hotspot {
  background: rgba(10,10,10,0.72);
  border: 2.5px solid #fff;
  border-radius: 50%;
  width: 20px !important;
  height: 20px !important;
  margin-left: -10px !important;
  margin-top: -10px !important;
  animation: pulse-hotspot 2.5s infinite;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.pannor-hotspot:hover {
  background: var(--gold);
  border-color: #fff;
  transform: scale(1.3);
}

@keyframes pulse-hotspot {
  0%   { box-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 0 0 0   rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 0 0 9px rgba(255,255,255,0);   }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 0 0 0   rgba(255,255,255,0);   }
}

/* ── TOUR VIEWER (PUBLIC) ───────────────────────────────────────────────────── */
#tour-wrapper {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
}

#tour-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
  pointer-events: none;
}
#tour-header > * { pointer-events: auto; }

#tour-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold);
  text-decoration: none;
}

#tour-room-name {
  position: absolute;
  top: 60px;
  left: 20px;
  z-index: 20;
  background: rgba(0,0,0,0.6);
  color: var(--gold);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

#tour-panorama {
  flex: 1;
  position: relative;
}

/* ── SIDE NAV TOGGLE BUTTON ─────────────────────────────────────────────────── */
#nav-toggle {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20,20,20,0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(201,168,76,0.45);
  color: var(--gold);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#nav-toggle:hover {
  background: rgba(30,30,30,0.92);
  border-color: var(--gold);
}

/* ── SIDE NAV PANEL ─────────────────────────────────────────────────────────── */
#tour-sidenav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 260px;
  height: 100%;
  z-index: 40;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
}
#tour-sidenav.open { right: 0; }

.sidenav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidenav-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.sidenav-close:hover { color: #fff; }

#sidenav-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.3) transparent;
}
#sidenav-list::-webkit-scrollbar { width: 3px; }
#sidenav-list::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.3); border-radius: 2px; }

.sidenav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  padding: 11px 20px;
  font-size: 0.88rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.sidenav-btn:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
}
.sidenav-btn.active {
  color: var(--gold);
  font-weight: 600;
  background: rgba(201,168,76,0.08);
}
.sidenav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
  transition: background 0.2s;
}
.sidenav-btn.active .sidenav-dot { background: var(--gold); }

/* ── BACKDROP ───────────────────────────────────────────────────────────────── */
#sidenav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s;
}
#sidenav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#btn-contact {
  background: #25D366;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
#btn-contact:hover { background: #1ebe5d; color: #fff; }

/* Loading screen */
#tour-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s;
}
#tour-loading .logo {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--gold);
}
.loading-bar {
  width: 120px;
  height: 2px;
  background: rgba(201,168,76,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-inner {
  height: 100%;
  background: var(--gold);
  animation: loading 1.5s ease-in-out infinite;
}
@keyframes loading {
  0% { width: 0; margin-left: 0; }
  50% { width: 80%; margin-left: 10%; }
  100% { width: 0; margin-left: 100%; }
}

/* ── TOAST ──────────────────────────────────────────────────────────────────── */
.pannor-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--surface-2);
  border: 1px solid var(--gold-border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── UTILITIES ──────────────────────────────────────────────────────────────── */
.min-w-0 { min-width: 0; }
