/* ─────────────────────────────────────────────
 * Fibralink — estilos compartilhados entre as páginas
 * Contém: variáveis, reset, header, status-bar,
 *         campos de formulário e o botão de confirmar.
 * Estilos específicos de layout (mapa, card) ficam em
 * index.css e endereco.css.
 * ───────────────────────────────────────────── */

:root {
  --navy:    #021533;
  --navy2:   #042058;
  --navy3:   #0a2d72;
  --green:   #16a34a;
  --green2:  #22c55e;
  --white:   #ffffff;
  --muted:   #7fa5d8;
  --border:  rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.06);
  --error:   #ef4444;
  --success: #22c55e;
  --radius:  10px;
  --panel-w: 390px;
}

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

body {
  font-family: 'Barlow', sans-serif;
  background: var(--navy);
  color: var(--white);
}

/* ── HEADER ─────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  height: 58px;
  background: var(--navy2);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(34,197,94,0.06) 100%);
  pointer-events: none;
}

.logo-wrap { display: flex; align-items: center; gap: 10px; }

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(37,99,235,0.4);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 900;
  letter-spacing: 0.5px; line-height: 1;
  color: var(--white);
}

.header-right { margin-left: auto; }

.header-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 4px; border-radius: 20px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.30);
  color: var(--green2);
  letter-spacing: 0.8px; text-transform: uppercase;
}

/* ── STATUS BAR ─────────────────────────────── */
.status-bar {
  display: flex;
  justify-self: center;
  
  gap: 8px;

  padding: 10px 14px;
  border-radius: 12px;

  font-size: 12px;
  font-weight: 600;

  transition: all 0.3s;

  width: fit-content;     /* 🔥 faz crescer com conteúdo */
  max-width: 280px;       /* 🔥 controla o tamanho máximo */

  height: auto;

  white-space: pre-line;  /* 🔥 faz o \n funcionar */
  word-break: break-word; /* 🔥 evita estourar */
}
.status-bar.idle    { background: rgba(127,165,216,0.08); color: var(--muted);   border: 1px solid transparent;}
.status-bar.loading { background: rgba(59,130,246,0.1);   color: #60a5fa;        border: 1px solid rgba(59,130,246,0.2); }
.status-bar.success { background: rgba(34,197,94,0.1);    color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.status-bar.error   { background: rgba(239,68,68,0.1);    color: var(--error);   border: 1px solid rgba(239,68,68,0.2); }

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-bar.loading .status-dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── CAMPOS DE FORMULÁRIO ───────────────────── */
.field { margin-bottom: 14px; }

.field label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--muted); margin-bottom: 5px;
}

.field label .req { color: var(--green2); margin-left: 2px; }

.field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus {
  border-color: var(--green2);
  background: rgba(34,197,94,0.06);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
.field input::placeholder { color: rgba(127,165,216,0.5); }
.field input.warn { border-color: rgba(251,191,36,0.7); }
.field input[readonly] {
  color: #555;
  user-select: none;
  cursor: default;
  pointer-events: none;
}

/* ── BOTÃO CONFIRMAR ────────────────────────── */
.confirm-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, rgba(21,128,61,0.55), rgba(34,197,94,0.30));
  border: 1px solid rgba(34,197,94,0.30);
  border-radius: var(--radius);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 900;
  letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(22,163,74,0.15);
}
.confirm-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(21,128,61,0.75), rgba(34,197,94,0.45));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22,163,74,0.3);
}
.confirm-btn:disabled {
  opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none;
}

.required-hint { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.required-hint .req { color: var(--green2); }
