/* Painel de gestão FIRE OPS. Visual alinhado com a app: fundo quase preto,
   acento vermelho, tipografia forte. Sem dependências externas. */

:root {
  --bg: #050505;
  --panel: #0a0a0a;
  --line: #1b1b1b;
  --line-2: #262626;
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #e10600;
  --danger: #b91c1c;
  --ok: #16a34a;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.brand {
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 34px;
  font-style: italic;
}
.brand.small {
  font-size: 20px;
}
.brand .accent {
  color: var(--accent);
  margin-left: 4px;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 700;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.1);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  color: #fff;
  border-color: var(--accent);
}
.btn-danger {
  background: transparent;
  color: #f87171;
  border-color: #7f1d1d;
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

input,
select,
textarea {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.error {
  color: #f87171;
  font-size: 13px;
  margin: 6px 0 0;
}

/* LOGIN */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-sub {
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  margin: 4px 0 28px;
}
#login-form {
  display: grid;
  gap: 12px;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-actions {
  display: flex;
  gap: 10px;
}

/* LISTA */
.lista {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}
.loading {
  color: var(--muted);
  text-align: center;
  padding: 40px;
}
.cat-group {
  margin-bottom: 26px;
}
.cat-title {
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin: 0 0 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.row:hover {
  border-color: var(--line-2);
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-weight: 700;
  font-size: 14px;
}
.row-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.ok {
  color: #86efac;
  background: rgba(22, 163, 74, 0.14);
}
.badge.no {
  color: #fca5a5;
  background: rgba(185, 28, 28, 0.16);
}

/* EDITOR */
.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: 24px 16px 60px;
  z-index: 20;
}
.editor-panel {
  width: 100%;
  max-width: 560px;
  background: #070707;
  border: 1px solid var(--line-2);
  border-radius: 16px;
}
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.editor-head h2 {
  margin: 0;
  font-size: 18px;
}
.editor-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.editor-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.editor-form label.check {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.editor-form label.check input {
  width: auto;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upload-field {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px;
  margin: 0;
  display: grid;
  gap: 10px;
}
.upload-field legend {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 6px;
}
.dropzone {
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag {
  border-color: var(--accent);
  background: rgba(225, 6, 0, 0.06);
}
.dropzone.done {
  border-color: var(--ok);
  color: #86efac;
}
.dz-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dz-progress .bar {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--line-2);
  overflow: hidden;
  position: relative;
}
.dz-progress .bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  background: var(--accent);
  transition: width 0.2s;
}
.dz-progress .pct {
  font-size: 12px;
  color: var(--text);
  min-width: 38px;
}
.editor-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.editor-foot .btn-primary {
  margin-left: auto;
}

@media (max-width: 520px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
