:root {
  --bg: #fffdf9;
  --surface: #fff;
  --text: #211d19;
  --muted: #716a63;
  --line: #ebe4da;
  --primary: #e86f2c;
  --primary-dark: #c95016;
  --soft: #fff1e6;
  --shadow: 0 14px 40px rgba(54, 35, 20, .10)
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif
}

a {
  color: inherit;
  text-decoration: none
}

button,
input,
select,
textarea {
  font: inherit
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: auto
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line)
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 22px
}

.brand b,
.brand small {
  display: block
}

.brand b {
  font-size: 18px
}

.brand small {
  font-size: 11px;
  color: var(--muted)
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px
}

.main-nav a:hover {
  color: var(--primary)
}

.icon-btn,
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer
}

.menu-toggle {
  display: none
}

.hero {
  padding: 70px 0 40px;
  background: radial-gradient(circle at 80% 20%, #ffe0c8, transparent 34%), linear-gradient(135deg, #fffaf4, #fff2e7)
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 50px
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  margin: 14px 0 20px
}

.hero h1 em {
  color: var(--primary);
  font-weight: 500
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 650px
}

.hero img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: var(--shadow)
}

.eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em
}

.hero-search {
  display: flex;
  background: var(--surface);
  padding: 7px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  max-width: 610px;
  margin-top: 26px
}

.hero-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  outline: none
}

.hero-search button,
.primary,
.button {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer
}

.stats {
  background: var(--surface);
  border-bottom: 1px solid var(--line)
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 25px 0
}

.stats-grid div {
  text-align: center;
  border-right: 1px solid var(--line)
}

.stats-grid div:last-child {
  border: 0
}

.stats-grid b {
  display: block;
  font-size: 26px;
  color: var(--primary)
}

.stats-grid span {
  color: var(--muted);
  font-size: 13px
}

.section {
  padding-top: 55px;
  padding-bottom: 55px
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px
}

.section-head h2 {
  font-family: Georgia, serif;
  font-size: 34px;
  margin: 0
}

.section-head p {
  color: var(--muted);
  margin: 4px 0
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px
}

.featured-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 280px;
  color: #fff;
  box-shadow: var(--shadow)
}

.featured-card img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s
}

.featured-card:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, rgba(0, 0, 0, .78))
}

.featured-card span,
.featured-card small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px
}

.featured-card span {
  bottom: 42px;
  font-size: 17px;
  font-weight: 800
}

.featured-card small {
  bottom: 20px;
  color: #eee
}

.featured-card:hover img {
  transform: scale(1.06)
}

.filters-section {
  padding: 30px 0;
  border-block: 1px solid var(--line);
  background: var(--surface)
}

.categories {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 15px
}

.categories a {
  white-space: nowrap;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px
}

.categories a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.categories small {
  opacity: .7
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto auto;
  gap: 10px
}

.filter-bar input,
.filter-bar select,
.recipe-form input,
.recipe-form select,
.recipe-form textarea,
.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none
}

.filter-bar button {
  border: 0;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  padding: 0 18px
}

.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  white-space: nowrap
}

.check input {
  width: auto !important
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 7px 24px rgba(45, 30, 18, .06);
  transition: .25s
}

.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow)
}

.card-image {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s
}

.recipe-card:hover .card-image img {
  transform: scale(1.04)
}

.difficulty {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize
}

.card-image .difficulty {
  position: absolute;
  top: 13px;
  left: 13px
}

.difficulty.easy {
  background: #dcfce7;
  color: #166534
}

.difficulty.medium {
  background: #fef3c7;
  color: #92400e
}

.difficulty.hard {
  background: #fee2e2;
  color: #991b1b
}

.favorite-btn {
  border: 0;
  background: #fff;
  color: #aaa;
  border-radius: 50%;
  cursor: pointer
}

.card-image .favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 20px
}

.favorite-btn.active {
  color: #e11d48
}

.card-body {
  padding: 18px
}

.rating {
  color: #e29b16;
  font-weight: 700
}

.rating small {
  color: var(--muted)
}

.card-body h3 {
  font-size: 20px;
  margin: 8px 0
}

.card-body p {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 47px
}

.card-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
  font-size: 12px
}

.empty {
  text-align: center;
  padding: 70px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted)
}

.footer {
  margin-top: 50px;
  background: #251f1a;
  color: #eee
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  padding: 40px 0
}

.footer p {
  color: #bdb5ae
}

.footer-grid div:last-child {
  display: flex;
  gap: 20px
}

.copyright {
  text-align: center;
  padding: 15px;
  border-top: 1px solid #443b34;
  color: #aaa
}

.recipe-hero {
  position: relative;
  height: 520px;
  color: #fff;
  display: flex;
  align-items: end;
  overflow: hidden
}

.recipe-hero>img,
.recipe-hero .overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.recipe-hero .overlay {
  background: linear-gradient(transparent 15%, rgba(0, 0, 0, .82))
}

.recipe-hero-content {
  position: relative;
  padding-bottom: 45px
}

.recipe-hero-content h1 {
  font: 56px/1.1 Georgia, serif;
  margin: 12px 0
}

.recipe-hero-content p {
  max-width: 760px;
  font-size: 18px
}

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 35px;
  padding-top: 35px
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 18px
}

.quick-stats div {
  text-align: center;
  padding: 20px;
  border-right: 1px solid var(--line)
}

.quick-stats div:last-child {
  border: 0
}

.quick-stats b,
.quick-stats span {
  display: block
}

.quick-stats span {
  font-size: 12px;
  color: var(--muted)
}

.recipe-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px
}

.recipe-actions button {
  flex: 1
}

.favorite-btn.wide {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px
}

.content-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 24px
}

.content-box h2,
.content-box h3 {
  font-family: Georgia, serif
}

.ingredients {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px
}

.ingredients li {
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 85%, var(--soft));
  border-radius: 9px
}

.ingredients input:checked+span {
  text-decoration: line-through;
  color: var(--muted)
}

.steps {
  list-style: none;
  padding: 0
}

.steps li {
  display: flex;
  gap: 15px;
  margin-bottom: 20px
}

.steps li>span,
.current-step>span {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--primary);
  font-weight: 800
}

.steps p {
  margin: 5px 0
}

.sticky {
  position: sticky;
  top: 95px
}

.nutrition {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px
}

.nutrition div {
  text-align: center;
  background: var(--soft);
  padding: 14px;
  border-radius: 12px
}

.nutrition b,
.nutrition span {
  display: block
}

.nutrition span {
  font-size: 11px;
  color: var(--muted)
}

.stars {
  display: flex;
  gap: 5px
}

.stars button {
  border: 0;
  background: none;
  font-size: 28px;
  color: #d4cec8;
  cursor: pointer;
  padding: 0
}

.stars button:hover,
.stars button.selected {
  color: #f0a51b
}

.rating-summary {
  font-size: 12px;
  color: var(--muted)
}

.cooking-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .7);
  display: none;
  place-items: center;
  padding: 20px
}

.cooking-modal.open {
  display: grid
}

.cooking-panel {
  position: relative;
  width: min(680px, 100%);
  background: var(--surface);
  border-radius: 24px;
  padding: 35px
}

.close-cooking {
  position: absolute;
  top: 15px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 30px;
  color: var(--text);
  cursor: pointer
}

.cook-progress progress {
  width: 100%;
  accent-color: var(--primary)
}

.current-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: 150px;
  padding: 30px 0;
  font-size: 20px
}

.cook-nav {
  display: flex;
  justify-content: space-between
}

.cook-nav button {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text)
}

.cook-nav .primary {
  background: var(--primary);
  color: #fff
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px
}

.admin-head>div:last-child {
  display: flex;
  gap: 10px
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line)
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px
}

table {
  width: 100%;
  border-collapse: collapse
}

th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line)
}

th {
  background: var(--soft)
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center
}

.actions form {
  margin: 0
}

.actions button {
  border: 0;
  background: none;
  color: #b91c1c;
  cursor: pointer
}

.recipe-form,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px
}

.form-grid label,
.auth-card label {
  display: grid;
  gap: 7px;
  font-weight: 700
}

.form-grid small {
  font-weight: 400;
  color: var(--muted)
}

.form-grid .full {
  grid-column: 1/-1
}

.auth-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(430px, calc(100% - 30px));
  display: grid;
  gap: 16px
}

.auth-card h1,
.auth-card p {
  margin: 0
}

.auth-card p,
.auth-card small {
  color: var(--muted)
}

.alert.error,
.toast.error {
  background: #fee2e2;
  color: #991b1b
}

.toast {
  position: fixed;
  z-index: 100;
  top: 84px;
  right: 20px;
  background: #dcfce7;
  color: #166534;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow)
}

.dark {
  --bg: #171411;
  --surface: #211d19;
  --text: #f7f2ec;
  --muted: #aaa198;
  --line: #3a332e;
  --soft: #32251c;
  --shadow: 0 14px 40px rgba(0, 0, 0, .3)
}

@media(max-width:900px) {

  .hero-grid,
  .recipe-layout {
    grid-template-columns: 1fr
  }

  .hero img {
    max-height: 300px
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .recipe-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr
  }

  .filter-bar input {
    grid-column: 1/-1
  }

  .sticky {
    position: static
  }

  .recipe-hero {
    height: 430px
  }

  .recipe-hero-content h1 {
    font-size: 42px
  }
}

@media(max-width:620px) {
  .container {
    width: min(100% - 22px, 1180px)
  }

  .menu-toggle {
    display: block
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 18px;
    flex-direction: column;
    border-bottom: 1px solid var(--line)
  }

  .main-nav.open {
    display: flex
  }

  .hero {
    padding-top: 40px
  }

  .hero-grid {
    gap: 25px
  }

  .hero h1 {
    font-size: 44px
  }

  .hero-search {
    flex-direction: column
  }

  .stats-grid b {
    font-size: 21px
  }

  .featured-grid,
  .recipe-grid {
    grid-template-columns: 1fr
  }

  .featured-card {
    min-height: 240px
  }

  .filter-bar {
    grid-template-columns: 1fr
  }

  .filter-bar input {
    grid-column: auto
  }

  .filter-bar button {
    padding: 12px
  }

  .section {
    padding-block: 38px
  }

  .section-head h2 {
    font-size: 29px
  }

  .recipe-hero {
    height: 470px
  }

  .recipe-hero-content h1 {
    font-size: 36px
  }

  .recipe-layout {
    padding-top: 18px
  }

  .ingredients {
    grid-template-columns: 1fr
  }

  .quick-stats div {
    padding: 14px 5px
  }

  .recipe-actions {
    flex-direction: column
  }

  .form-grid {
    grid-template-columns: 1fr
  }

  .form-grid .full {
    grid-column: auto
  }

  .admin-head {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column
  }

  .footer-grid {
    flex-direction: column;
    gap: 20px
  }

  .card-meta {
    font-size: 11px
  }
}

/* Refinos visuais da página inicial */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 82% 18%, rgba(232, 111, 44, .18), transparent 28%), linear-gradient(135deg, #fffaf4 0%, #fff0e4 100%);
}

.hero:before,
.hero:after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero:before {
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -130px;
  background: rgba(232, 111, 44, .10);
}

.hero:after {
  width: 110px;
  height: 110px;
  left: 46%;
  top: 12%;
  background: rgba(255, 193, 120, .18);
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero h1 {
  letter-spacing: -.045em;
  max-width: 680px;
}

.hero p {
  max-width: 560px;
}

.hero-search {
  border: 1px solid rgba(232, 111, 44, .12);
  transition: box-shadow .25s, transform .25s;
}

.hero-search:focus-within {
  box-shadow: 0 16px 35px rgba(54, 35, 20, .14);
  transform: translateY(-2px);
}

.hero-search button {
  min-width: 100px;
}

.hero img {
  border: 8px solid rgba(255, 255, 255, .7);
  transform: rotate(1.5deg);
  transition: transform .35s;
}

.hero img:hover {
  transform: rotate(0) scale(1.015);
}

.stats {
  background: transparent;
  border: 0;
  margin-top: -30px;
  position: relative;
  z-index: 3;
}

.stats-grid {
  gap: 16px;
  padding: 0;
}

.stats-grid div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(54, 35, 20, .07);
  padding: 18px 12px;
}

.stats-grid div:last-child {
  border: 1px solid var(--line);
}

.stats-grid b {
  font-size: 28px;
}

.section-head h2 {
  letter-spacing: -.025em;
}

.filters-section {
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.categories {
  padding-bottom: 18px;
}

.categories a {
  background: var(--bg);
  transition: .2s;
}

.categories a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(54, 35, 20, .05);
}

.recipe-card {
  border-radius: 22px;
}

.card-image {
  aspect-ratio: 5 / 4;
}

.card-body h3 a {
  transition: color .2s;
}

.card-body h3 a:hover {
  color: var(--primary-dark);
}

.card-body p {
  line-height: 1.5;
}

@media (max-width: 620px) {
  .stats {
    margin-top: -18px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .stats-grid div {
    padding: 13px 5px;
  }

  .stats-grid b {
    font-size: 20px;
  }

  .stats-grid span {
    font-size: 11px;
  }

  .hero img {
    transform: none;
    border-width: 5px;
  }

  .filter-bar {
    padding: 10px;
  }
}

.dark .hero {
  background: radial-gradient(circle at 82% 18%, rgba(232, 111, 44, .20), transparent 28%), linear-gradient(135deg, #211b17 0%, #302018 100%);
}

.dark .hero img {
  border-color: rgba(255, 255, 255, .08);
}

.dark .stats-grid div,
.dark .filter-bar {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .20);
}

.recipe-hero-content>a {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 4px 0;
}

.recipe-hero-content>a+.difficulty {
  margin-left: 12px;
  vertical-align: middle;
}

.recipe-actions {
  align-items: stretch;
}

.recipe-actions button,
.recipe-actions .favorite-btn.wide {
  min-height: 44px;
  padding: 11px 20px;
  line-height: 1.35;
}

.recipe-hero {
  height: 430px;
}

.recipe-hero>img {
  object-position: center 48%;
}

@media (max-width: 900px) {
  .recipe-hero {
    height: 390px;
  }
}

@media (max-width: 620px) {
  .recipe-hero {
    height: 360px;
  }

  .recipe-actions button,
  .recipe-actions .favorite-btn.wide {
    width: 100%;
  }
}

.legal-page {
  max-width: 900px;
}

.legal-page .section-head {
  margin-bottom: 24px;
}

.legal-page h1 {
  font: 48px/1.1 Georgia, serif;
  margin: 12px 0 6px;
}

.legal-page .content-box {
  line-height: 1.75;
}

.legal-page .content-box h2 {
  margin: 28px 0 8px;
}

.legal-page .content-box h2:first-child {
  margin-top: 0;
}

@media (max-width: 620px) {
  .legal-page h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  .footer-grid {
    align-items: center;
    text-align: center;
  }

  .footer-grid div:last-child {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.current-step {
  justify-content: center;
}

.current-step p {
  width: 100%;
  margin: 0;
}