/* ============================================================
   Portal de Aprovação — Visual redesenhado
   Paleta: roxo #6a00f4 · magenta #ff00ff · lima #ccff00
           menta #00ff88 · creme #f8ffe5 · preto #0a0a0a
   ============================================================ */

:root {
  --bg: #f8ffe5;
  --bg-soft: #f0f8dc;
  --card: #ffffff;
  --border: #e3edd2;
  --border-strong: #d2e3b8;
  --text: #0a0a0a;
  --muted: #5f6b58;
  --primary: #6a00f4;
  --primary-dark: #5600c8;
  --magenta: #ff00ff;
  --lime: #ccff00;
  --mint: #00ff88;
  --teal: #07c7b9;
  --cyan: #00f7ff;
  --lime-dark: #7c9900;
  --mint-dark: #00a35a;
  --magenta-dark: #d400d4;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(106, 0, 244, 0.10);
  --shadow-lg: 0 18px 60px rgba(106, 0, 244, 0.16);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(204, 255, 0, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0, 255, 136, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: var(--primary); }

/* ---------- navbar ---------- */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  box-shadow: 0 4px 14px rgba(106, 0, 244, 0.35);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .15s;
}
.nav-links a:hover { color: var(--primary); background: rgba(106,0,244,0.06); }
.nav-links a.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--magenta)); }
.nav-user {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 10px;
}
.btn-logout {
  color: var(--magenta-dark) !important;
  font-weight: 700;
}

/* ---------- container ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 30px 0 14px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ---------- flash ---------- */
.flash {
  padding: 13px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.flash-success { background: #e6fff3; color: #00663a; border-color: var(--mint); }
.flash-error { background: #ffe6ff; color: #990099; border-color: var(--magenta); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 5px solid var(--primary);
  border-radius: 22px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  box-shadow: 0 12px 30px rgba(106, 0, 244, 0.35);
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-card .muted { margin: 0 0 28px; }
.login-card .form { text-align: left; }

/* ---------- forms ---------- */
.form label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="date"],
.form input[type="number"],
.form select,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(106, 0, 244, 0.12);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--magenta));
  border: none;
  color: #fff;
  box-shadow: 0 8px 20px rgba(106, 0, 244, 0.30);
}
.btn-primary:hover { filter: brightness(1.05); color: #fff; box-shadow: 0 10px 26px rgba(106, 0, 244, 0.40); }
.btn-danger { color: var(--magenta-dark); }
.btn-danger:hover { border-color: var(--magenta); color: var(--magenta-dark); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; margin-top: 22px; }
.btn-approve { background: linear-gradient(135deg, var(--mint), var(--teal)); border: none; color: #00301f; }
.btn-approve:hover { filter: brightness(0.95); color: #00301f; }
.btn-reject { background: linear-gradient(135deg, var(--magenta), var(--magenta-dark)); border: none; color: #fff; }
.btn-reject:hover { filter: brightness(0.95); color: #fff; }
.btn-row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 22px 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(106, 0, 244, 0.06);
  transition: transform .15s;
}
.stat:hover { transform: translateY(-2px); }
.stat-num { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.stat-total .stat-num { color: var(--primary); }
.stat-pending .stat-num { color: var(--lime-dark); }
.stat-approved .stat-num { color: var(--mint-dark); }
.stat-rejected .stat-num { color: var(--magenta-dark); }

/* ---------- tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(106, 0, 244, 0.05);
}
.table th, .table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.table th {
  background: #f4fbdf;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fbfef3; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.badge-pending { background: var(--lime); color: #1a2400; }
.badge-approved { background: var(--mint); color: #002b16; }
.badge-rejected { background: var(--magenta); color: #fff; }
.badge-platform { background: #eee4ff; color: #4c1d95; }
.badge-format { background: #e0f2ff; color: #075985; }

/* ---------- cards / grid ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 6px 18px rgba(106, 0, 244, 0.05);
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-head h1 { margin: 0; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(106, 0, 244, 0.06);
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(106, 0, 244, 0.16); }
.post-thumb { width: 100%; height: 150px; object-fit: cover; display: block; background: #eef0f3; }
.post-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.post-card-body { padding: 15px; }
.post-card-title { font-weight: 700; margin-bottom: 6px; }
.post-card-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }

/* ---------- post detail ---------- */
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--primary); }
.post-detail h1 { margin-bottom: 10px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-detail-image { width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; margin-bottom: 22px; background: #eef0f3; }
.post-image { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; margin: 8px 0; background: #eef0f3; }
.caption-box {
  background: #fbfef1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  white-space: pre-wrap;
  font-size: 0.95rem;
}
.comment-line { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.review-box { margin-top: 26px; padding-top: 22px; border-top: 2px solid var(--lime); }
.review-box h2 { margin-top: 0; }
.empty-state { padding: 48px 0; text-align: center; }

/* ---------- form row (plataforma + formato) ---------- */
.form-row { display: flex; gap: 16px; }
.form-col { flex: 1; }

/* ---------- imagens existentes (edição) ---------- */
.image-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.image-item {
  width: 140px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  text-align: center;
}
.image-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
.checkbox-remove {
  display: block;
  padding: 7px;
  font-size: 0.8rem;
  color: var(--magenta-dark);
  cursor: pointer;
  font-weight: 600;
}
.checkbox-remove input { margin-right: 4px; }

/* ---------- galeria (visualização do cliente) ---------- */
.gallery { display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px; }
.gallery-item { margin: 0; text-align: center; }
.gallery-item img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  background: #eef0f3;
}
.gallery-item figcaption { margin-top: 7px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* ---------- info do post na tabela ---------- */
.post-info-line { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 6px; }
  .nav-links a { padding: 7px 10px; }
  .form-row { flex-direction: column; gap: 0; }
  .login-card { padding: 34px 24px; }
}
