/* Sistema visual — branco + azul oceano metálico. Compartilhado por todas as telas do produto. */

:root {
  --bg: #F3F8FC;
  --bg-grad: linear-gradient(180deg, #FFFFFF 0%, #EEF5FA 100%);
  --surface: #FFFFFF;
  --surface-2: #EAF1F7;
  --border: #DAE6EF;
  --border-strong: #C2D6E4;

  --ink: #0E2233;
  --ink-soft: #4E6578;
  --ink-faint: #93A7B7;

  --ocean-deep: #063A5E;
  --ocean-mid: #0E6BA8;
  --ocean-light: #3FA9E0;
  --ocean-highlight: #A9E3FF;

  --success: #17825A;
  --success-soft: #E4F5EC;
  --danger: #C4453A;
  --danger-soft: #FBEAE8;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(14, 34, 51, 0.06);
  --shadow-md: 0 6px 20px rgba(14, 34, 51, 0.10);
  --shadow-lg: 0 16px 40px rgba(14, 34, 51, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Inter', -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .fonte-display {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Cartão/superfície --- */
.superficie {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.superficie.interativa:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --- Campos --- */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="file"], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover, textarea:hover, select:hover { border-color: var(--border-strong); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ocean-mid);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(14, 107, 168, 0.14);
}

/* --- Botão 3D metálico azul oceano --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, var(--ocean-light) 0%, var(--ocean-mid) 55%, var(--ocean-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px rgba(2, 20, 33, 0.35),
    0 1px 1px rgba(6, 58, 94, 0.4),
    0 6px 14px rgba(6, 58, 94, 0.32);
  text-shadow: 0 1px 2px rgba(2, 20, 33, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 6px rgba(2, 20, 33, 0.35),
    0 2px 2px rgba(6, 58, 94, 0.4),
    0 10px 22px rgba(6, 58, 94, 0.38);
}
.btn:active {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 2px 5px rgba(2, 20, 33, 0.4),
    0 1px 1px rgba(6, 58, 94, 0.3);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; transform: none; }
.btn.largo { width: 100%; }
.btn.fantasma {
  background: var(--surface);
  color: var(--ocean-deep);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  text-shadow: none;
}
.btn.fantasma:hover { background: var(--surface-2); box-shadow: var(--shadow-md); }
.btn.perigo {
  background: linear-gradient(180deg, #E27167 0%, #C4453A 55%, #8E2E26 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -3px 6px rgba(50,10,8,0.35), 0 6px 14px rgba(140,40,32,0.32);
}

/* --- Badges/pills --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.off { background: var(--danger-soft); color: var(--danger); }

/* --- Ícones (linha, estilo Tabler) --- */
.icone { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -3px; }

/* --- Toast/modal (substitui alert()/confirm()) --- */
.modal-fundo {
  position: fixed; inset: 0; background: rgba(6, 20, 32, 0.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.modal-fundo.aberto { opacity: 1; pointer-events: all; }
.modal-caixa {
  background: var(--surface); border-radius: 16px; padding: 28px 26px; width: 320px;
  box-shadow: var(--shadow-lg); text-align: center;
  transform: scale(0.92) translateY(8px); transition: transform 0.18s ease;
}
.modal-fundo.aberto .modal-caixa { transform: scale(1) translateY(0); }
.modal-caixa h3 { margin: 0 0 8px; font-size: 17px; }
.modal-caixa p { margin: 0 0 20px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 1100; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
}
.toast.mostrar { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.erro { background: var(--danger); }
.toast.sucesso { background: var(--success); }

/* --- Cabeçalho padrão --- */
.topo {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  background: rgba(255,255,255,0.75); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topo .marca { display: flex; align-items: center; gap: 10px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15.5px; color: var(--ink); white-space: nowrap; }
.topo .marca .logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(155deg, var(--ocean-highlight), var(--ocean-mid) 60%, var(--ocean-deep));
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), 0 3px 8px rgba(6,58,94,0.35);
  display: flex; align-items: center; justify-content: center; color: white;
}
.topo a.link-sutil { color: var(--ink-soft); font-size: 13px; text-decoration: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; }
.topo a.link-sutil:hover { background: var(--surface-2); color: var(--ink); }

.empty-hint { color: var(--ink-faint); font-size: 13.5px; }

/* --- Confete (canvas de celebração) --- */
#tela-confete { position: fixed; inset: 0; pointer-events: none; z-index: 2000; }
