/* Orbi Salus — splash (antes do login) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700&display=swap');

body.app-splash-open {
  overflow: hidden;
}

/* Botão de tema na splash (mesma preferência que o resto do app: localStorage os_theme) */
.app-splash__theme-btn {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 210;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.app-splash__theme-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] .app-splash__theme-btn {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.1);
}
html[data-theme="light"] .app-splash__theme-btn:hover {
  background: #fff;
}

/* ─── Tema escuro (padrão) ─── */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 1.5rem 2rem 2rem;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: #fff;
  background-color: #070d1f;
  background-image: radial-gradient(circle at center, #0f2a2d 0%, #0a1228 75%, #070d1f 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

.app-splash__main {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 2rem;
  padding-top: 8%;
}

.app-splash__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 300px;
}

.app-splash .nucleus {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12) 0%, rgba(19, 236, 128, 0.1) 100%);
  box-shadow:
    inset 0 0 50px rgba(19, 236, 128, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.05),
    0 0 40px rgba(19, 236, 128, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-splash .nucleus-logo {
  width: 72%;
  height: 72%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

@keyframes app-splash-orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.app-splash .orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border: 1px solid rgba(19, 236, 128, 0.2);
  border-radius: 50%;
  z-index: 5;
  animation: app-splash-orbit-spin 5s linear 1;
}

.app-splash .orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #13ec80;
  border-radius: 50%;
  box-shadow: 0 0 15px 3px rgba(19, 236, 128, 0.8);
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.app-splash__status {
  width: 100%;
  margin-top: 20%;
  margin-bottom: 5rem;
  text-align: center;
}

.app-splash__percent {
  letter-spacing: 0.25em;
  opacity: 0.7;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: #13ec80;
  font-weight: 300;
}

.app-splash__footer {
  padding-bottom: 4rem;
  text-align: center;
}

.app-splash__title {
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: inherit;
}

.app-splash__title-bold {
  font-weight: 700;
}

.app-splash__title-light {
  font-weight: 300;
}

.app-splash__tagline {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
  color: #13ec80;
  text-transform: none;
  margin: 0 auto;
  max-width: 20rem;
  padding: 0 0.5rem;
}

/* ─── Modo claro (segue data-theme do html) ─── */
html[data-theme="light"] .app-splash {
  color: #0f172a;
  background-color: #f4f7fc;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% 20%, rgba(109, 254, 156, 0.18) 0%, transparent 55%),
    radial-gradient(circle at center, #e8f4ef 0%, #e2eaf4 45%, #f4f7fc 100%);
}

html[data-theme="light"] .app-splash .nucleus {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(109, 254, 156, 0.12) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    inset 0 0 40px rgba(109, 254, 156, 0.08),
    0 8px 32px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .app-splash .orbit-ring {
  border-color: rgba(25, 190, 100, 0.35);
}

html[data-theme="light"] .app-splash .orbit-dot {
  background-color: #19be64;
  box-shadow: 0 0 14px 2px rgba(25, 190, 100, 0.55);
}

html[data-theme="light"] .app-splash__percent {
  color: #15803d;
  opacity: 0.9;
}

html[data-theme="light"] .app-splash__title {
  color: #0f172a;
  letter-spacing: 0.35em;
}

html[data-theme="light"] .app-splash__tagline {
  color: #166534;
  font-weight: 600;
  letter-spacing: 0.04em;
}
