/* GIFO Editorial — shared styles */
:root {
  --bg:       #0A0B0E;
  --surface:  #111318;
  --border:   rgba(240,244,255,.08);
  --blue:     #1A6EFF;
  --cyan:     #00E5CC;
  --text:     #F0F4FF;
  --muted:    #8B8FA8;
  --mono:     "JetBrains Mono", "Fira Code", monospace;
  --red:      #FF3B3B;
  --green:    #00C853;
  --yellow:   #FFB800;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top Bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,14,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.topbar-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--blue);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

.topbar-sep { flex: 1; }

.topbar-tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 10px;
  font-family: var(--mono);
}

.topbar-link {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.topbar-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }

/* ── Page layout ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 48px 0 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(26,110,255,.1);
  border: 1px solid rgba(26,110,255,.2);
  color: var(--blue);
  font-size: 11px;
  font-family: var(--mono);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
  letter-spacing: .5px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero h1 span { color: var(--blue); }

.hero p {
  color: var(--muted);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Card / Section ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Form ── */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--mono);
  letter-spacing: .3px;
}

.field label .req { color: var(--red); margin-left: 2px; }

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(240,244,255,.04);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, background .15s;
  appearance: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  background: rgba(26,110,255,.05);
}

.field textarea { resize: vertical; min-height: 90px; }

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238B8FA8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.field-hint { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── File Upload zone ── */
.upload-zone {
  border: 1px dashed rgba(240,244,255,.15);
  border-radius: 6px;
  background: rgba(240,244,255,.02);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--blue);
  background: rgba(26,110,255,.05);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.upload-icon { font-size: 24px; margin-bottom: 8px; display: block; }
.upload-label { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.upload-hint-text { font-size: 11px; color: var(--muted); }
.upload-zone.has-file { border-color: var(--cyan); background: rgba(0,229,204,.04); }
.upload-zone.has-file .upload-icon { color: var(--cyan); }

/* ── Checkbox / Consent ── */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.consent input[type="checkbox"] { margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: #1560e0; border-color: #1560e0; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-danger { background: rgba(255,59,59,.1); color: var(--red); border-color: rgba(255,59,59,.2); }
.btn-danger:hover { background: rgba(255,59,59,.2); }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Progress steps ── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.step.active { color: var(--blue); }
.step.done { color: var(--cyan); }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  flex-shrink: 0;
}
.step.active .step-num { border-color: var(--blue); background: rgba(26,110,255,.12); color: var(--blue); }
.step.done .step-num { border-color: var(--cyan); background: rgba(0,229,204,.1); color: var(--cyan); }

.step-line { flex: 1; min-width: 20px; height: 1px; background: var(--border); margin: 0 6px; }

/* ── Toast / Alert ── */
.alert {
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.alert-success { background: rgba(0,200,83,.08); border: 1px solid rgba(0,200,83,.2); color: #00C853; }
.alert-error   { background: rgba(255,59,59,.08); border: 1px solid rgba(255,59,59,.2); color: var(--red); }
.alert-info    { background: rgba(26,110,255,.08); border: 1px solid rgba(26,110,255,.2); color: var(--blue); }

/* ── Admin table ── */
.tbl-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: .5px;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

tr:hover td { background: rgba(240,244,255,.02); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}

.badge-pendente  { background: rgba(255,184,0,.1);   color: var(--yellow); border: 1px solid rgba(255,184,0,.2); }
.badge-em-analise{ background: rgba(26,110,255,.1);  color: var(--blue);   border: 1px solid rgba(26,110,255,.2); }
.badge-aprovada  { background: rgba(0,200,83,.1);    color: var(--green);  border: 1px solid rgba(0,200,83,.2); }
.badge-rejeitada { background: rgba(255,59,59,.1);   color: var(--red);    border: 1px solid rgba(255,59,59,.2); }
.badge-publicada { background: rgba(0,229,204,.1);   color: var(--cyan);   border: 1px solid rgba(0,229,204,.2); }

/* ── Admin detail drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 200;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.drawer-overlay.open { display: flex; }

.drawer {
  background: var(--surface);
  border-left: 1px solid var(--border);
  width: 480px;
  max-width: 100vw;
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.drawer-title { font-size: 15px; font-weight: 700; }
.drawer-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.drawer-close:hover { background: var(--border); color: var(--text); }

.detail-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start; }
.detail-label { width: 130px; flex-shrink: 0; font-size: 11px; color: var(--muted); font-family: var(--mono); padding-top: 1px; }
.detail-val { font-size: 12px; color: var(--text); flex: 1; word-break: break-word; }

.detail-sep { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ── Admin login overlay ── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 36px;
  width: 340px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 24px;
}
.login-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.login-box h2 { font-size: 18px; margin-bottom: 4px; }
.login-box p  { font-size: 12px; color: var(--muted); margin-bottom: 24px; }

/* ── Stats bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
}

.stat-val { font-size: 24px; font-weight: 800; margin-bottom: 2px; }
.stat-label { font-size: 11px; color: var(--muted); font-family: var(--mono); }

/* ── Success screen ── */
.success-screen {
  text-align: center;
  padding: 60px 20px;
}
.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-screen h2 { font-size: 22px; margin-bottom: 8px; }
.success-screen p { color: var(--muted); font-size: 14px; max-width: 400px; margin: 0 auto 20px; }
.success-ref {
  display: inline-block;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--cyan);
  background: rgba(0,229,204,.08);
  border: 1px solid rgba(0,229,204,.2);
  border-radius: 6px;
  padding: 10px 24px;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(240,244,255,.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .page, .page-wide { padding: 24px 16px 60px; }
  .card { padding: 18px 16px; }
  .hero { padding: 28px 0 24px; }
}
