/**
 * BottomNav.css - Barra de navegacao inferior
 * Fixada no bottom, blur background, safe area aware.
 * Redesign: icones SVG, botao central destacado, 60px de altura.
 */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  padding: 8px 0 4px;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item--active {
  color: #fff;
}

.bottom-nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s;
}

.bottom-nav-item--active .bottom-nav-icon {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent);
}

/* Botao central SOS - destaque circular vermelho */
.bottom-nav-icon--sos {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  margin-top: -20px;
  box-shadow: 0 2px 14px rgba(239, 68, 68, 0.4);
  animation: sosPulse 2s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Pulso animado no SOS pra chamar atencao */
.bottom-nav-icon--sos::after {
  content: "SOS";
  position: absolute;
  bottom: -14px;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: 0.08em;
}

@keyframes sosPulse {
  0%, 100% { box-shadow: 0 2px 14px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 2px 22px rgba(239, 68, 68, 0.7); }
}

.bottom-nav-icon--sos:active {
  transform: scale(0.93);
}

.bottom-nav-item--active .bottom-nav-icon--sos {
  position: relative;
  background: #dc2626;
  box-shadow: 0 2px 18px rgba(239, 68, 68, 0.55);
}

.bottom-nav-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.8;
}

.bottom-nav-item--active .bottom-nav-label {
  opacity: 1;
  color: var(--accent);
}

/* Desktop: centraliza e limita largura */
@media (min-width: 768px) {
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
  }
}
/**
 * global.css - Estilos globais e design tokens do XO 171 user PWA
 * Limpeza 21/04/2026: removidas ~1000 linhas de admin-CSS (admin virou bundle separado).
 * Mantido: tokens, reset, body, bottom-nav (duplicado com BottomNav.css — nao mexer ainda),
 * .admin-toast (usado pelo useToast.jsx), utilidades.
 * Sistema de tema: :root (light) + [data-theme="dark"] (Samsung One UI).
 */

/* ─── DESIGN TOKENS — LIGHT (default) ───────────────────────────── */
:root {
  /* Surfaces */
  --bg-primary:         #0a1628;           /* header/dark sections */
  --bg-secondary:       #111d32;
  --bg-tertiary:        #1a2940;
  --bg-content:         #f5f6fa;           /* main body */
  --bg-card:            #fafbfc;
  --bg-card-hover:      #f8f9fc;

  /* Text — "dark" prefixo = texto sobre fundo CLARO */
  --text-primary:       #e4e8ef;           /* sobre dark */
  --text-secondary:     #8899ad;           /* sobre dark, secundario */
  --text-dark:          #1a1d26;           /* sobre claro */
  --text-dark-secondary:#5f6880;
  --text-muted:         #94a3b8;
  --text-placeholder:   #9ca3af;

  /* Accent — azul */
  --accent:             #3b82f6;
  --accent-hover:       #2563eb;
  --accent-light:       rgba(59, 130, 246, 0.08);
  --accent-dim:         rgba(59, 130, 246, 0.15);
  --accent-dark:        #1e3a5f;

  /* Status */
  --danger:             #ef4444;
  --danger-light:       #f87171;
  --danger-dim:         rgba(239, 68, 68, 0.12);
  --success:            #10b981;
  --success-light:      #34d399;
  --success-dim:        rgba(16, 185, 129, 0.12);
  --warning:            #f59e0b;
  --warning-light:      #fbbf24;
  --warning-dim:        rgba(245, 158, 11, 0.12);

  /* Borders */
  --border:             rgba(255, 255, 255, 0.08);
  --border-light:       rgba(0, 0, 0, 0.10);
  --border-input:       rgba(0, 0, 0, 0.12);
  --border-hover:       rgba(0, 0, 0, 0.18);

  /* Shadows */
  --shadow-card:        0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover:  0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-header:      0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-bottom-nav:  0 -1px 0 rgba(0, 0, 0, 0.05), 0 -4px 24px rgba(0, 0, 0, 0.06);
  --shadow-sos:         0 4px 16px rgba(239, 68, 68, 0.45);
  --shadow-sos-hover:   0 6px 24px rgba(239, 68, 68, 0.60);
  --shadow-stat:        0 1px 3px rgba(0, 0, 0, 0.06);

  /* Radius */
  --radius-sm:          6px;
  --radius-md:          10px;
  --radius-lg:          14px;
  --radius-xl:          20px;
  --radius-full:        9999px;
  --radius:             12px;               /* legacy */

  /* Spacing */
  --space-1:            4px;
  --space-2:            8px;
  --space-3:            12px;
  --space-4:            16px;
  --space-5:            20px;
  --space-6:            24px;

  /* Typography */
  --font-heading:       'Playfair Display', Georgia, serif;
  --font-body:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:          'SF Mono', 'Menlo', 'Consolas', monospace;
  --font-family:        var(--font-body);    /* legacy */

  /* Motion */
  --ease-standard:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:        cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:      0.15s;
  --duration-base:      0.20s;
  --duration-slow:      0.30s;
}

/* ─── DESIGN TOKENS — DARK (Samsung One UI) ─────────────────────── */
[data-theme="dark"] {
  /* Surfaces — cinza-grafite com hierarquia (nao #000 puro, estilo Linear/GitHub) */
  --bg-primary:         #0c0c0f;       /* body — preto-grafite */
  --bg-secondary:       #15151a;       /* header areas */
  --bg-tertiary:        #1a1a1f;
  --bg-content:         #121215;       /* main content — leve degrade pra dentro */
  --bg-card:            #1e1e23;       /* card — mais claro que content, destaca */
  --bg-card-hover:      #28282e;

  /* Text */
  --text-primary:       #ffffff;
  --text-secondary:     #8e8e93;
  --text-dark:          #ffffff;
  --text-dark-secondary:#aeaeb2;
  --text-muted:         #8e8e93;
  --text-placeholder:   #636366;

  /* Accent — Samsung One UI blue */
  --accent:             #3478f6;
  --accent-hover:       #4d8ef8;
  --accent-light:       #1a3a6e;
  --accent-dim:         rgba(52, 120, 246, 0.15);

  /* Status — iOS tone */
  --danger:             #ff3b30;
  --danger-light:       #ff453a;
  --danger-dim:         rgba(255, 59, 48, 0.15);
  --success:            #30d158;
  --success-light:      #34c759;
  --success-dim:        rgba(48, 209, 88, 0.15);
  --warning:            #ffd60a;
  --warning-light:      #ffe234;
  --warning-dim:        rgba(255, 214, 10, 0.15);

  /* Borders */
  --border:             rgba(255, 255, 255, 0.08);
  --border-light:       rgba(255, 255, 255, 0.06);
  --border-input:       rgba(255, 255, 255, 0.12);
  --border-hover:       rgba(255, 255, 255, 0.18);

  /* Shadows */
  --shadow-card:        0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.04);
  --shadow-card-hover:  0 6px 20px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.07);
  --shadow-header:      0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-bottom-nav:  0 -1px 0 rgba(255, 255, 255, 0.05), 0 -4px 24px rgba(0, 0, 0, 0.4);
  --shadow-stat:        0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
  }
}

/* Bottom-safe area helper (BottomNav fixa no rodape) */
.feed,
.report,
.profile,
.checklist {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .feed,
  .report,
  .profile,
  .checklist {
    padding-bottom: 96px;
  }
}

/* ─── BOTTOM NAV ────────────────────────────────────────────────── */
/* NOTA: duplicado com BottomNav.css — nao consolidado ainda (Bloco 1). */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #0a1628f5;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  padding: 8px 0 4px;
  color: #ffffff73;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item--active {
  color: #fff;
}
.bottom-nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s;
}
.bottom-nav-item--active .bottom-nav-icon {
  background: #3b82f633;
  color: var(--accent);
}
.bottom-nav-icon--sos {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  margin-top: -16px;
  box-shadow: 0 2px 14px #ef444466;
  transition: transform 0.2s, box-shadow 0.2s;
}
.bottom-nav-icon--sos:active {
  transform: scale(0.93);
}
.bottom-nav-item--active .bottom-nav-icon--sos {
  background: #dc2626;
  box-shadow: 0 2px 18px #ef44448c;
}
.bottom-nav-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.8;
}
.bottom-nav-item--active .bottom-nav-label {
  opacity: 1;
  color: var(--accent);
}
@media (min-width: 768px) {
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translate(-50%);
    border-radius: 16px 16px 0 0;
  }
}

/* ─── ADMIN TOAST (usado pelo useToast.jsx do user app) ─────────── */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: admin-toast-in 0.3s ease-out;
}
.admin-toast--success {
  background: var(--success);
}
.admin-toast--error {
  background: var(--danger);
}
@keyframes admin-toast-in {
  0% {
    opacity: 0;
    transform: translate(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%) translateY(0);
  }
}

/* ─── KEYFRAMES COMPARTILHADOS ──────────────────────────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
