/* nyX — Design System v1 (identidade aprovada Diogo 09/07) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

:root {
  /* acentos fixos nos dois temas */
  --green:  #10B981;
  --green2: #34D399;
  --blue:   #2F7DF6;
  --blue2:  #5AA0FF;
  --pw7:    #0951C7;
  --red:    #DD1226;
  --tilebg: #072B40;

  /* tema escuro (default) */
  --bg:    #011A28;
  --surf:  #04283C;
  --card:  #063049;
  --line:  rgba(255,255,255,.09);
  --input: #00131d;
  --ink:   #F3F7FA;
  --mut:   #93A7B4;
}

[data-theme="light"] {
  --bg:    #EEF2F6;
  --surf:  #FFFFFF;
  --card:  #F5F8FB;
  --line:  #E3E7EC;
  --input: #F1F4F8;
  --ink:   #16181D;
  --mut:   #5B6B76;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue2); }

/* ---------- Logo X ---------- */
.nyx-logo-x {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  background: linear-gradient(125deg, var(--ink) 0%, var(--ink) 47%, var(--blue) 53%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* X no selo (fundo sempre escuro) */
.nyx-selo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tilebg);
  border-radius: 12px;
}
.nyx-selo .nyx-logo-x {
  background: linear-gradient(125deg, #fff 0%, #fff 47%, var(--blue) 53%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* marca escrita "ny" + X */
.nyx-marca {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  letter-spacing: -.5px;
}
.nyx-marca span { font-weight: 900; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  z-index: 100;
  animation: splash-fade 0.4s ease 1.6s forwards;
}

.splash-logo {
  font-size: 72px;
  animation: splash-logo 0.7s cubic-bezier(.22,.68,0,1.2) forwards;
}

.splash-bar-wrap {
  width: 120px; height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.splash-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 2px;
  animation: splash-fill 1.2s ease forwards;
}

.splash-label {
  font-size: 13px;
  color: var(--mut);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

@keyframes splash-logo {
  from { opacity: 0; transform: scale(.85) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes splash-fill {
  0%   { width: 0%; }
  70%  { width: 80%; }
  100% { width: 100%; }
}
@keyframes splash-fade {
  to { opacity: 0; pointer-events: none; }
}

/* ---------- Layout base ---------- */
.nyx-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Card / superfície ---------- */
.nyx-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform .15s, filter .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover   { transform: translateY(-1px); filter: brightness(1.1); }
.btn:active  { transform: translateY(0);   filter: brightness(.95); }

.btn-primary  { background: var(--green); color: #fff; }
.btn-blue     { background: var(--blue);  color: #fff; }
.btn-danger   { background: var(--red);   color: #fff; }
.btn-outline  {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-block { width: 100%; }

/* ---------- Inputs ---------- */
.nyx-label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--mut);
  margin-bottom: 6px;
}
.nyx-input {
  width: 100%;
  background: var(--input);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit; font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.nyx-input:focus { border-color: var(--blue); }
.nyx-input::placeholder { color: var(--mut); }

.nyx-field { margin-bottom: 16px; }

/* ---------- Alerta de erro ---------- */
.nyx-erro {
  background: rgba(221,18,38,.12);
  border: 1px solid rgba(221,18,38,.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: #FF6B7A;
  margin-bottom: 16px;
}

/* ---------- Status / farol ---------- */
.nyx-farol {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.farol-verde   { background: var(--green); box-shadow: 0 0 6px var(--green); }
.farol-cinza   { background: var(--mut); }
.farol-vermelho { background: var(--red);  box-shadow: 0 0 6px var(--red); }

/* ---------- Pulse ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
.pulse { animation: pulse-dot 1.8s ease-in-out infinite; }

/* ---------- Home cards ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 360px) { .home-grid { grid-template-columns: 1fr; } }

.home-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s, border-color .15s;
}
.home-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  color: var(--ink);
}
.home-card-icon {
  font-size: 32px;
  line-height: 1;
}
.home-card-title {
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Topo com saudação ---------- */
.nyx-topo {
  padding: 24px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.nyx-saudacao {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.nyx-saudacao-sub {
  font-size: 14px;
  color: var(--mut);
  margin-top: 4px;
}

/* ---------- Topo com volta ---------- */
.nyx-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.nyx-back {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color .15s;
}
.nyx-back:hover { border-color: var(--blue); color: var(--blue); }

.nyx-header-title { font-size: 16px; font-weight: 700; }

/* ---------- Toggle de tema ---------- */
#nyx-tema-btn {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surf);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: border-color .15s, box-shadow .15s;
}
#nyx-tema-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(47,125,246,.25);
}
