/* Guia da Gestante — direção "Caderno solar" (Skill designer) */
:root {
  --bg: #fff8ef;
  --bg-deep: #ffe8c8;
  --ink: #1a1208;
  --muted: #6e6258;
  --line: #eadfce;
  --card: #ffffff;
  --primary: #ff4d2e;
  --primary-deep: #e0381c;
  --secondary: #0d9f8a;
  --secondary-soft: #d5f3ed;
  --sun: #ffd24a;
  --lilac: #9b6bdb;
  --shadow: 4px 4px 0 #1a1208;
  --shadow-soft: 0 12px 28px rgba(26, 18, 8, 0.08);
  --radius: 18px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --shell: 440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.18s;
  --dur-base: 0.4s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 210, 74, 0.55) 0 8%, transparent 9%),
    radial-gradient(circle at 88% 12%, rgba(255, 77, 46, 0.22) 0 12%, transparent 13%),
    radial-gradient(circle at 70% 88%, rgba(13, 159, 138, 0.18) 0 14%, transparent 15%),
    linear-gradient(165deg, #fffdf8 0%, var(--bg) 42%, #ffe9c9 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: min(100%, var(--shell));
  margin: 0 auto;
  padding: 1.2rem 1.05rem 3rem;
}

/* Header */
.topbar {
  margin-bottom: 1.1rem;
  animation: rise var(--dur-base) var(--ease) both;
}
.brand-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.brand-lockup {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.brand-mark {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  position: relative;
}
.brand-mark .sq {
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: 0.85rem;
  transform: rotate(-6deg);
}
.brand-mark .dot {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
  right: -0.15rem;
  top: -0.15rem;
  animation: bob 2.6s var(--ease) infinite;
}
.brand-mark .slash {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 46%;
  height: 3px;
  background: var(--primary);
  transform: rotate(-18deg);
  border-radius: 2px;
}
.brand-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.brand-text p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 28ch;
}
.topbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.user-name {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  margin: 0 0 1.15rem;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
  animation: rise var(--dur-base) var(--ease) 0.05s both;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) ease;
}
.tab:hover { transform: translate(-1px, -1px); }
.tab.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.tab-progress {
  margin-left: 0.3rem;
  opacity: 0.75;
  font-weight: 600;
  font-size: 0.72rem;
}

/* Main */
.guide-main { display: grid; gap: 0.8rem; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  animation: rise var(--dur-base) var(--ease) 0.08s both;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.section-progress {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.section-progress strong {
  color: var(--primary-deep);
  font-family: var(--font-display);
  font-size: 1rem;
}

.progress-rail {
  height: 10px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
  animation: rise var(--dur-base) var(--ease) 0.1s both;
}
.progress-rail > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sun), var(--primary));
  transition: width 0.45s var(--ease);
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.stack { display: grid; gap: 0.85rem; }
.pair { display: grid; gap: 0.85rem; }

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  animation: rise var(--dur-base) var(--ease) both;
}
.stack > *:nth-child(1) { animation-delay: 0.1s; }
.stack > *:nth-child(2) { animation-delay: 0.14s; }
.stack > *:nth-child(3) { animation-delay: 0.18s; }
.stack > *:nth-child(4) { animation-delay: 0.22s; }
.stack > *:nth-child(5) { animation-delay: 0.26s; }

.card h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.card-sub {
  margin: -0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.theme-rn { background: linear-gradient(180deg, #f6efff 0%, #fff 42%); }
.theme-p { background: linear-gradient(180deg, #fff7db 0%, #fff 42%); }
.theme-m { background: linear-gradient(180deg, #e8faf5 0%, #fff 42%); }
.theme-g { background: linear-gradient(180deg, #ffe8da 0%, #fff 42%); }
.theme-acessorios { background: linear-gradient(180deg, #f3e9ff 0%, #fff 40%); }
.theme-mala-bebe { background: linear-gradient(180deg, #e8f0ff 0%, #fff 40%); }
.theme-mala-mamae { background: linear-gradient(180deg, #ffe6e0 0%, #fff 40%); }
.theme-mala-acomp { background: linear-gradient(180deg, #e8faf5 0%, #fff 40%); }
.theme-docs { background: linear-gradient(180deg, #fff4cc 0%, #fff 40%); }
.theme-planos { background: linear-gradient(180deg, #e8faf5 0%, #fff 40%); }
.intro-mala {
  background: linear-gradient(145deg, #fff 0%, #ffe0d8 100%);
}

.check-list, .qty-list, .link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.check-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.55rem 0.4rem;
  border-radius: 12px;
  cursor: pointer;
}
.check-row:hover { background: rgba(255, 77, 46, 0.06); }
.check-row span { line-height: 1.4; font-size: 0.92rem; font-weight: 500; }

/* Custom checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
input[type="checkbox"]:hover {
  transform: translate(-0.5px, -0.5px);
}
input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(255, 77, 46, 0.35);
  outline-offset: 2px;
}
input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--ink);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.05rem;
  width: 0.32rem;
  height: 0.65rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}
input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.qty-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.48rem 0;
  border-bottom: 1.5px dashed var(--line);
  font-size: 0.92rem;
  font-weight: 500;
}
.qty-list li:last-child { border-bottom: 0; }
.qty-list strong {
  font-family: var(--font-display);
  color: var(--primary-deep);
  font-size: 0.95rem;
  background: var(--sun);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  min-width: 1.7rem;
  text-align: center;
  line-height: 1.5;
  padding: 0 0.25rem;
}

.table-wrap { overflow-x: auto; }
.tri-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.tri-table th, .tri-table td {
  padding: 0.5rem 0.3rem;
  border-bottom: 1.5px solid var(--line);
  text-align: center;
}
.tri-table th:first-child,
.tri-table td:first-child { text-align: left; }
.tri-table th {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tri-table input[type="checkbox"] {
  margin: 0 auto;
  display: block;
}

.tip-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.9rem; }
.tip-warn { background: #fff3c4; }
.tip-soft { background: var(--secondary-soft); }

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.6rem 0.35rem;
  border-radius: 10px;
  border-bottom: 1.5px solid var(--line);
  font-weight: 600;
}
.link-list li:last-child a { border-bottom: 0; }
.link-list a:hover { background: rgba(13, 159, 138, 0.08); }
.link-store {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: center;
}

.notes-card textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 0.85rem;
  font: inherit;
  resize: vertical;
  min-height: 8rem;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.notes-card textarea:focus {
  outline: 3px solid rgba(255, 77, 46, 0.35);
  background: #fff;
}
.note-status {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--secondary);
  font-weight: 800;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.gallery-item {
  margin: 0;
  min-height: 115px;
  border-radius: 16px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,18,8,0.65), transparent 55%);
}
.gallery-item figcaption {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}
.g1 { background: linear-gradient(135deg, var(--secondary), #065f52); }
.g2 { background: linear-gradient(135deg, var(--primary), #9a2412); }
.g3 { background: linear-gradient(135deg, var(--lilac), #4b2d7a); }

/* Auth */
.auth-main {
  min-height: 70vh;
  display: grid;
  align-content: center;
  animation: rise var(--dur-base) var(--ease) both;
}
.auth-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 1.4rem 1.2rem 1.35rem;
  box-shadow: 6px 6px 0 var(--ink);
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
  top: -0.45rem;
  right: 1.2rem;
}
.auth-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2rem);
  letter-spacing: -0.035em;
  line-height: 1;
}
.auth-lead {
  margin: 0.6rem 0 1.1rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}
.auth-form { display: grid; gap: 0.85rem; }
.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.auth-form input {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  text-transform: none;
  letter-spacing: 0;
}
.auth-form input:focus {
  outline: 3px solid rgba(255, 77, 46, 0.35);
}
.form-error {
  background: #ffe0d8;
  border: 2px solid var(--ink);
  color: #8f2f24;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}
.auth-switch {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-switch a {
  color: var(--primary-deep);
  font-weight: 800;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
.btn:hover { transform: translate(-1px, -1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0.15rem 0;
  font-size: 0.8rem;
  box-shadow: none;
  border-radius: 0;
}
.btn-ghost:hover { color: var(--ink); transform: none; }

.site-footer {
  margin-top: 1.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.item-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  padding: 0.15rem 0.35rem 0.7rem 2.1rem;
}
.extra-field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.extra-field select,
.extra-field input[type="number"] {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  min-height: 2.35rem;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.extra-field select {
  min-width: 10.5rem;
  padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 55%,
    calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.extra-field input[type="number"] {
  width: 5.4rem;
  min-width: 0;
  -moz-appearance: textfield;
}
.extra-field input[type="number"]::-webkit-outer-spin-button,
.extra-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.extra-field select:hover,
.extra-field input[type="number"]:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.extra-field select:focus,
.extra-field input[type="number"]:focus {
  outline: 3px solid rgba(255, 77, 46, 0.3);
  outline-offset: 1px;
}
.extra-check {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem 0.35rem 0.4rem;
  margin-bottom: 0.05rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  min-height: 2.35rem;
}
.extra-check input[type="checkbox"] {
  margin: 0;
  width: 1.1rem;
  height: 1.1rem;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.extra-check:hover {
  background: #fff8ef;
}
.reserved-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary);
  background: var(--secondary-soft);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.btn-delete-item {
  border: 1.5px solid var(--ink);
  background: #fff;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}
.add-item-form {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.add-item-form input {
  flex: 1;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.add-item-form .btn { padding: 0.55rem 0.85rem; }
.is-skipped { opacity: 0.62; }
.is-skipped .check-row span { text-decoration: line-through; }
.is-current {
  background: #fff3c4;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
}
.extras-row td { border-bottom: 1.5px solid var(--line); padding-top: 0; }
.extras-row .item-extras { padding-left: 0.2rem; }

.just-saved { animation: flash 0.55s ease; }
@keyframes flash {
  40% { background: var(--secondary-soft); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

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

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

@media (min-width: 760px) {
  :root { --shell: 800px; }
  .pair { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .brand-text h1 { font-size: 1.7rem; }
}
