/* ==========================================================================
   Abaixo Assinado Doutor Gearhead — área administrativa
   Mesma paleta da página pública, densidade de painel operacional.
   ========================================================================== */

:root {
  --ink: #05080f;
  --navy: #0b1524;
  --panel: #101a2a;
  --panel-soft: #162133;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --amber: #d99b3c;
  --amber-bright: #f0bb63;
  --text: #e8ecf3;
  --text-soft: #a4b0c2;
  --text-mute: #6f7d92;
  --danger: #e2685f;
  --success: #4fbf8b;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--text);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(217, 155, 60, 0.06), transparent 60%),
    linear-gradient(170deg, var(--navy), var(--ink) 70%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { width: min(1240px, 100% - 2rem); margin-inline: auto; }

/* ==============================================================  LOGIN  */

.login-wrap { display: grid; place-items: center; min-height: 100svh; padding: 2rem 0; }

.login-card {
  width: min(430px, 100%);
  padding: clamp(1.7rem, 6vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 40px 90px -46px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  animation: rise 0.7s var(--ease) both;
}

.login-card__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.login-card__title {
  margin: 0.35rem 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  /* Folga no topo: com line-height apertado o background-clip corta acentos. */
  line-height: 1.02;
  padding-top: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(176deg, #fff 8%, #ccd5e4 45%, #8b99b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-card__sub { margin: 0 0 1.8rem; color: var(--text-mute); font-size: 0.84rem; }

/* ==========================================================  CAMPOS  */

.field { position: relative; margin-bottom: 1rem; }

.field__input {
  width: 100%;
  padding: 1.5rem 1rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(4, 8, 15, 0.55);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.field__input::placeholder { color: transparent; }

.field__input:focus {
  outline: none;
  border-color: rgba(217, 155, 60, 0.65);
  box-shadow: 0 0 0 4px rgba(217, 155, 60, 0.12);
}

.field__label {
  position: absolute;
  top: 1rem;
  left: 1.05rem;
  font-size: 0.92rem;
  color: var(--text-mute);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-0.7rem) scale(0.72);
  color: var(--amber-bright);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

textarea.field__input { min-height: 190px; resize: vertical; line-height: 1.7; font-weight: 300; }

/* =============================================================  BOTÕES  */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn:hover { text-decoration: none; }

.btn--primary {
  color: #1a1206;
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  box-shadow: 0 12px 30px -16px rgba(217, 155, 60, 0.5);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--ghost { color: var(--text-soft); border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: var(--text-mute); }

.btn--danger { color: var(--danger); border-color: rgba(226, 104, 95, 0.35); background: transparent; padding: 0.4rem 0.7rem; font-size: 0.64rem; }
.btn--danger:hover { background: rgba(226, 104, 95, 0.12); }

.btn--block { width: 100%; }

/* ==============================================================  TOPO  */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 11, 20, 0.82);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
}

.topbar__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-right: auto;
}

.topbar__brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--text-mute);
}

.topbar__nav { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

.navlink {
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.navlink:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.navlink.is-active { color: var(--amber-bright); border-color: rgba(217, 155, 60, 0.35); background: rgba(217, 155, 60, 0.08); }

/* ============================================================  PAINEL  */

.page { padding: 2rem 0 4rem; }

.page__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  text-transform: uppercase;
  line-height: 1;
}

.stats { display: grid; gap: 0.85rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.6rem; }

@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat--accent .stat__value { color: var(--amber-bright); }

.stat__label {
  margin-top: 0.35rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.panel__title {
  margin: 0;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.search { display: flex; gap: 0.5rem; }

.search input {
  width: min(260px, 52vw);
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(4, 8, 15, 0.6);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.search input:focus { outline: none; border-color: rgba(217, 155, 60, 0.6); }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  white-space: nowrap;
}

tbody tr { transition: background 0.25s var(--ease); }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
tbody tr:last-child td { border-bottom: none; }

td.is-name { color: var(--text); font-weight: 400; white-space: normal; min-width: 180px; }
td.is-mono { font-variant-numeric: tabular-nums; color: var(--text-mute); font-size: 0.8rem; }

.empty { padding: 3rem 1.5rem; text-align: center; color: var(--text-mute); }

.pagination-wrap { padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.pagination-wrap svg { width: 16px; height: 16px; }

/* =====================================================  META DA CAMPANHA  */

.goalbox {
  margin-bottom: 1.6rem;
  padding: 1.2rem 1.3rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(217, 155, 60, 0.07), rgba(255, 255, 255, 0.012));
}

.goalbox__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.goalbox__title {
  margin: 0;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.goalbox__form { display: flex; gap: 0.5rem; }

.goalbox__form input {
  width: 150px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(4, 8, 15, 0.6);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.goalbox__form input:focus { outline: none; border-color: rgba(217, 155, 60, 0.6); }

.goalbox__track {
  position: relative;
  height: 11px;
  border-radius: 999px;
  background: rgba(4, 8, 15, 0.65);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.goalbox__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
  box-shadow: 0 0 14px rgba(217, 155, 60, 0.3);
}

.goalbox__fill.is-started { min-width: 7px; }

.goalbox__note { margin: 0.75rem 0 0; font-size: 0.78rem; color: var(--text-mute); }
.goalbox__note strong { color: var(--amber-bright); font-weight: 600; font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.028);
}

.chip strong { color: var(--amber-bright); font-variant-numeric: tabular-nums; }

/* ===========================================================  ALERTAS  */

.alert {
  margin-bottom: 1.2rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid rgba(226, 104, 95, 0.4);
  border-left-width: 3px;
  border-radius: 11px;
  background: rgba(226, 104, 95, 0.09);
  font-size: 0.85rem;
  color: #f0b4ae;
}

.alert--ok {
  border-color: rgba(79, 191, 139, 0.4);
  background: rgba(79, 191, 139, 0.09);
  color: #9fe0c0;
}

/* ========================================================  PROPOSTAS  */

.editor { display: grid; gap: 1.2rem; }

.editor__card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

@media (min-width: 900px) { .editor__card { grid-template-columns: 260px 1fr; } }

.editor__media { position: relative; min-height: 190px; background: #0a1320; }
.editor__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }

.editor__media span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-bright);
  background: rgba(5, 8, 15, 0.75);
  border: 1px solid rgba(217, 155, 60, 0.35);
}

.editor__form { padding: 1.4rem; }

.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.82rem; color: var(--text-soft); }
.switch input { width: 18px; height: 18px; accent-color: var(--amber); }

.editor__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
