@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --verde: #2e7d4f;
  --verde-claro: #e8f5ee;
  --creme: #faf8f3;
  --ouro: #c8860a;
  --texto: #1c1c1c;
  --cinza: #6b7280;
  --borda: #e5e1d8;
  --branco: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--creme);
  color: var(--texto);
  min-height: 100vh;
}

/* --- HEADER --- */
header {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--texto);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--verde);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: var(--cinza);
  font-weight: 400;
}

.header-actions a {
  font-size: 13px;
  color: var(--cinza);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s;
}

.header-actions a:hover {
  background: var(--verde-claro);
  color: var(--verde);
}

/* --- HERO / BUSCA --- */
.hero {
  background: var(--verde);
  padding: 40px 24px;
  text-align: center;
  color: var(--branco);
}

.hero h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}
.hero p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 24px;
}

.search-box {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--branco);
  color: var(--texto);
}

.search-box .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cinza);
  font-size: 16px;
}

/* --- FILTROS --- */
.filtros {
  padding: 20px 24px 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filtro-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--borda);
  background: var(--branco);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--texto);
  transition: all 0.15s;
  font-weight: 500;
}

.filtro-btn:hover,
.filtro-btn.ativo {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--branco);
}

/* --- GRID RECEITAS --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.contador {
  font-size: 13px;
  color: var(--cinza);
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: var(--branco);
  border-radius: 12px;
  border: 1px solid var(--borda);
  overflow: hidden;
  text-decoration: none;
  color: var(--texto);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-thumb {
  aspect-ratio: 16/9;
  background: var(--verde-claro);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.card:hover .play-overlay {
  opacity: 1;
}

.play-overlay span {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 3px;
}

.card-body {
  padding: 14px;
  flex: 1;
}

.card-num {
  font-size: 11px;
  color: var(--cinza);
  margin-bottom: 4px;
}

.card-titulo {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.tag-Bolos {
  background: #fef3c7;
  color: #92400e;
}
.tag-Doces {
  background: #fce7f3;
  color: #9d174d;
}
.tag-Salgados {
  background: #dbeafe;
  color: #1e40af;
}
.tag-Laticínios {
  background: #f0fdf4;
  color: #166534;
}
.tag-Pães {
  background: #fff7ed;
  color: #9a3412;
}
.tag-Geral {
  background: var(--verde-claro);
  color: var(--verde);
}

.sem-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}

/* --- PÁGINA RECEITA --- */
.receita-header {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-voltar {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--cinza);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.btn-voltar:hover {
  background: var(--verde-claro);
  color: var(--verde);
}

.receita-titulo-header {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.video-wrapper {
  background: #000;
  max-height: 56vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 56vh;
  border: none;
  display: block;
}

.video-sem-link {
  color: #aaa;
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
}

.receita-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px;
}

.receita-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.receita-meta h1 {
  font-size: 22px;
  font-weight: 700;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--borda);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--cinza);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
}

.tab-btn.ativo {
  color: var(--verde);
  border-bottom-color: var(--verde);
}

.tab-panel {
  display: none;
}
.tab-panel.ativo {
  display: block;
}

.pdf-frame {
  width: 100%;
  height: 75vh;
  border: 1px solid var(--borda);
  border-radius: 8px;
}

.transcricao-texto {
  line-height: 1.8;
  font-size: 15px;
  color: var(--texto);
  white-space: pre-wrap;
}

.dicas-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dicas-lista li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--verde-claro);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.dicas-lista li::before {
  content: "💡";
  flex-shrink: 0;
  margin-top: 1px;
}

.vazio {
  text-align: center;
  padding: 48px 20px;
  color: var(--cinza);
  font-size: 14px;
}

/* --- ADMIN --- */
.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px;
}

.admin-container h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.form-card {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  gap: 12px;
  margin-bottom: 12px;
}

.form-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--cinza);
  display: block;
  margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--borda);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--texto);
  background: var(--branco);
  outline: none;
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--verde);
}

textarea {
  height: 80px;
  resize: vertical;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.85;
}
.btn-verde {
  background: var(--verde);
  color: #fff;
}
.btn-ouro {
  background: var(--ouro);
  color: #fff;
}
.btn-cinza {
  background: var(--borda);
  color: var(--texto);
}
.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--creme);
  border-bottom: 2px solid var(--borda);
  font-weight: 600;
  color: var(--cinza);
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--borda);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: var(--verde-claro);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.dot-ok {
  background: #22c55e;
}
.dot-no {
  background: #d1d5db;
}
