/* Estilos Alertas Joinville/SC */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1115;
  color: #e4e6eb;
  min-height: 100vh;
}

[v-cloak] { display: none; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #16181d;
  border-bottom: 1px solid #2a2d34;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 24px; }
.brand h1 { font-size: 18px; font-weight: 600; }

.topbar nav { display: flex; gap: 6px; }
.topbar nav a {
  color: #9ca3af;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
}
.topbar nav a:hover { background: #1f242b; color: #fff; }
.topbar nav a.active { background: #2b3038; color: #fff; }

.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9ca3af; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #555; transition: background .3s;
}
.dot.live { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.6); }

/* Main */
main { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Grid de cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Card de alerta */
.card {
  background: #1a1d23;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2d34;
  border-left: 4px solid #555;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.4); }

.card.sev-grande_perigo { border-left-color: #a855f7; }
.card.sev-perigo { border-left-color: #ef4444; }
.card.sev-perigo_potencial { border-left-color: #facc15; }
.card.sev-observacao { border-left-color: #6b7280; }
.card.sev-informativo { border-left-color: #22c55e; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card .emoji { font-size: 28px; }
.card h3 { font-size: 15px; line-height: 1.35; }
.card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sev-label {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: #2b3038; color: #d1d5db;
}
.card.sev-grande_perigo .sev-label { background: #6b21a8; color: #fff; }
.card.sev-perigo .sev-label { background: #991b1b; color: #fff; }
.card.sev-perigo_potencial .sev-label { background: #854d0e; color: #fff; }
.source { font-size: 12px; color: #6b7280; }
.card .area { font-size: 13px; color: #b0b7c3; }
.card .time { font-size: 12px; color: #6b7280; display: flex; flex-direction: column; gap: 2px; }
.card .note { font-size: 13px; color: #9ca3af; line-height: 1.5; }
.card .link { font-size: 13px; color: #60a5fa; text-decoration: none; word-break: break-all; }
.card .link:hover { text-decoration: underline; }

.icon-btn {
  background: #2b3038;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  color: #e4e6eb;
  transition: background .15s;
}
.icon-btn:hover { background: #3b4252; }

/* Empty */
.empty { text-align: center; padding: 80px 20px; color: #6b7280; }
.empty p { font-size: 18px; margin-bottom: 6px; }
.empty .hint { font-size: 14px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: #1a1d23;
  border: 1px solid #2a2d34;
  border-radius: 16px;
  padding: 24px;
  width: min(480px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 { font-size: 18px; margin-bottom: 4px; }
.modal-alert-title { font-size: 14px; color: #9ca3af; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #9ca3af; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  background: #0f1115;
  border: 1px solid #2a2d34;
  color: #e4e6eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: #60a5fa; }

.contacts-list { display: flex; flex-direction: column; gap: 6px; }
.contact-check {
  display: flex; align-items: center; gap: 10px;
  background: #0f1115;
  border: 1px solid #2a2d34;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}
.contact-check:hover { border-color: #60a5fa; }
.contact-check small { color: #6b7280; margin-left: 6px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn {
  border: none; border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn.primary { background: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.primary:disabled { background: #374151; cursor: not-allowed; }
.btn.ghost { background: #2b3038; color: #e4e6eb; }
.btn.ghost:hover { background: #3b4252; }
.btn.danger { background: #7f1d1d; color: #fff; font-size: 12px; padding: 6px 12px; }
.btn.danger:hover { background: #991b1b; }

.send-result { margin-top: 12px; font-size: 14px; color: #34d399; }
.send-result.error { color: #f87171; }

/* Filtros (histórico) */
.filters {
  display: flex; gap: 16px; flex-wrap: wrap;
  align-items: flex-end;
  background: #16181d;
  border: 1px solid #2a2d34;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label { font-size: 12px; color: #9ca3af; }
.filter-group select, .filter-group input {
  background: #0f1115;
  border: 1px solid #2a2d34;
  color: #e4e6eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

.results-info { margin-bottom: 12px; color: #9ca3af; font-size: 14px; }

/* Lista histórico */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.hcard {
  display: flex; gap: 14px;
  background: #16181d;
  border: 1px solid #2a2d34;
  border-left: 4px solid #555;
  border-radius: 10px;
  padding: 14px 16px;
}
.hcard.sev-grande_perigo { border-left-color: #a855f7; }
.hcard.sev-perigo { border-left-color: #ef4444; }
.hcard.sev-perigo_potencial { border-left-color: #facc15; }
.hcard.sev-observacao { border-left-color: #6b7280; }
.hcard.sev-informativo { border-left-color: #22c55e; }
.hcard .emoji { font-size: 22px; flex-shrink: 0; }
.hcard-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hcard h3 { font-size: 15px; }
.hcard .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #6b7280; }
.hcard .note { font-size: 13px; color: #9ca3af; }
.hcard .link { font-size: 13px; color: #60a5fa; text-decoration: none; word-break: break-all; }

/* Configurações */
.login-box {
  max-width: 420px;
  margin: 60px auto;
  background: #16181d;
  border: 1px solid #2a2d34;
  border-radius: 16px;
  padding: 28px;
}
.login-box h2 { margin-bottom: 6px; }
.login-box .hint { margin-bottom: 18px; }

.section-title { margin-bottom: 16px; }
.section-title h2 { font-size: 20px; }
.section-title .hint { font-size: 13px; color: #6b7280; }

.add-form {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: #16181d;
  border: 1px solid #2a2d34;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.add-form .field { flex: 1; min-width: 200px; margin-bottom: 0; }

.contacts-table { background: #16181d; border: 1px solid #2a2d34; border-radius: 12px; overflow: hidden; }
.contacts-table table { width: 100%; border-collapse: collapse; }
.contacts-table th, .contacts-table td {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #2a2d34;
}
.contacts-table th { background: #1f242b; color: #9ca3af; font-size: 12px; text-transform: uppercase; }
.contacts-table tr:last-child td { border-bottom: none; }

.hint { font-size: 13px; color: #6b7280; }

/* Responsivo */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 768px) {
  .topbar { flex-direction: column; gap: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
