:root {
  --bg: #fbf3e6;
  --bg-deep: #f4e7d3;
  --surface: #fffdf8;
  --surface-soft: #fdf6ea;
  --ink: #33241c;
  --ink-soft: #5c453a;
  --muted: #7c685c;
  --brand: #bf5a3c;
  --brand-dark: #9c452c;
  --brand-soft: #f7e2d8;
  --honey: #e9b44c;
  --honey-soft: #fdf0d3;
  --sage: #5f7f63;
  --sage-soft: #e6efe4;
  --danger: #b03a2e;
  --danger-soft: #fbe4df;
  --line: #ead9c3;
  --line-strong: #ddc6aa;
  --shadow: 0 18px 40px -24px rgba(72, 42, 24, 0.45);
  --shadow-soft: 0 10px 30px -20px rgba(72, 42, 24, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 110% -10%, #fbe8cc 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 0%, #f7e2d5 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0;
}

a {
  color: var(--brand-dark);
}

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

img {
  max-width: 100%;
}

.wrap {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(251, 243, 230, 0.82);
  border-bottom: 1px solid rgba(234, 217, 195, 0.7);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(191, 90, 60, 0.15);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.session-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.session-user strong {
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Botones ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 0.68rem 1.15rem;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  --btn-bg: var(--brand);
  --btn-fg: #fff8f3;
  box-shadow: 0 12px 24px -14px rgba(191, 90, 60, 0.85);
}

.btn-primary:hover:not(:disabled) {
  --btn-bg: var(--brand-dark);
}

.btn-outline {
  --btn-bg: transparent;
  --btn-line: var(--brand);
  --btn-fg: var(--brand-dark);
  border-color: var(--btn-line);
}

.btn-soft {
  --btn-bg: var(--brand-soft);
  --btn-fg: var(--brand-dark);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-soft);
}

.btn-ghost:hover {
  --btn-bg: rgba(234, 217, 195, 0.6);
}

.btn-danger {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
}

.btn-sage {
  --btn-bg: var(--sage);
  --btn-fg: #f6fbf4;
}

.btn-small {
  padding: 0.48rem 0.85rem;
  font-size: 0.85rem;
}

.btn-wide {
  width: 100%;
}

.btn-link {
  border: none;
  background: none;
  color: var(--brand-dark);
  padding: 0;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(191, 90, 60, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 2.2rem 0 1.6rem;
}

.hero-grid {
  display: grid;
  gap: 1.1rem;
}

.fund-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(500px 220px at 100% 0%, #fbe6c8 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}

.fund-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 180, 76, 0.18), transparent 65%);
  pointer-events: none;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chip-open {
  background: var(--sage-soft);
  color: var(--sage);
}

.chip-closed {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip-pending {
  background: var(--honey-soft);
  color: #8a5f10;
}

.chip-confirmed,
.chip-approved {
  background: var(--sage-soft);
  color: var(--sage);
}

.chip-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.4rem;
}

.amount {
  font-family: var(--font-head);
  font-size: clamp(3rem, 2rem + 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 0.2rem 0 0.6rem;
}

.small {
  font-size: 0.86rem;
}

.muted {
  color: var(--muted);
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 1.25rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
}

.countdown strong {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.micro {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.7rem;
  text-align: center;
}

.side-card,
.winner-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.55rem;
  box-shadow: var(--shadow-soft);
}

.winner-card {
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(233, 180, 76, 0.22), transparent 70%),
    var(--surface);
  border-color: #ecd7a9;
}

.winner-card h2 {
  margin-bottom: 0.45rem;
}

.winner-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin: 1.1rem 0 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.winner-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.35rem;
}

.stat-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.next-timer {
  margin-top: 1.1rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.next-timer strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Notice ---------- */

.notice-bar {
  background: var(--ink);
  color: #f8ecdc;
  padding: 0.8rem 0;
}

.notice-bar .wrap {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.notice-bar p {
  font-size: 0.86rem;
  max-width: 78ch;
}

.notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(248, 236, 220, 0.55);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1;
  margin-top: 1px;
}

/* ---------- Secciones ---------- */

.section {
  padding: 3rem 0 0.5rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.section-head .muted {
  max-width: 52ch;
}

.callout {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.callout-strong {
  background: var(--honey-soft);
  border-color: #eccf8f;
}

.callout-soft {
  background: var(--sage-soft);
  border-color: #c9dcc4;
  color: #33502f;
}

.callout-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
}

.suggestion-item.is-winner {
  border-color: #e6c26f;
  background: linear-gradient(180deg, #fff9ea, var(--surface));
}

.suggestion-main {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.suggestion-desc {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.suggestion-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.vote-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 74px;
}

.vote-count {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vote-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.vote-btn {
  margin-top: 0.3rem;
}

.voted-tag {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sage);
}

.empty {
  list-style: none;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
}

/* ---------- Cómo funciona ---------- */

.how-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.how-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.how-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Historial ---------- */

.history-list {
  display: grid;
  gap: 0.75rem;
}

.history-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  flex-wrap: wrap;
}

.history-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.history-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
}

.history-amount {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
}

.history-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  padding: 1.8rem 0 2.4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 26, 18, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  z-index: 60;
  animation: fade-in 0.15s ease;
}

.modal {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 1.4rem 1.3rem 1.6rem;
  box-shadow: 0 -20px 50px rgba(42, 26, 18, 0.25);
  animation: slide-up 0.2s ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.modal-head h2 {
  font-size: 1.45rem;
}

.modal-close {
  border: none;
  background: var(--surface-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  flex: none;
}

.modal-close:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.modal-body {
  display: grid;
  gap: 0.9rem;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.modal-actions .btn {
  flex: 1;
}

.modal-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Formularios ---------- */

.tabs {
  display: inline-flex;
  background: var(--bg-deep);
  padding: 4px;
  border-radius: 999px;
  gap: 2px;
  margin-bottom: 0.4rem;
}

.tab {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(72, 42, 24, 0.1);
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field > label,
.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select,
.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: #fff;
  padding: 0.62rem 0.75rem;
  font-size: 0.95rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(191, 90, 60, 0.15);
}

.field .help {
  font-size: 0.76rem;
  color: var(--muted);
}

.form-error {
  background: var(--danger-soft);
  color: #7f271e;
  border-radius: var(--radius-xs);
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.quick-amount {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.25rem;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}

.quick-amount:hover,
.quick-amount.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.amount-field {
  position: relative;
}

.amount-field span {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}

.amount-field input {
  padding-left: 1.9rem;
  font-size: 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
}

.method-grid {
  display: grid;
  gap: 0.5rem;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  background: #fff;
}

.method-option input {
  accent-color: var(--brand);
  width: 18px;
  height: 18px;
  flex: none;
}

.method-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.method-option strong {
  display: block;
  font-size: 0.92rem;
}

.method-option small {
  color: var(--muted);
  font-size: 0.76rem;
}

.breakdown {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  font-size: 0.9rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.22rem 0;
}

.breakdown-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.breakdown-row.total {
  border-top: 1px solid var(--line-strong);
  margin-top: 0.4rem;
  padding-top: 0.55rem;
  font-weight: 700;
  color: var(--sage);
}

.breakdown-row.dim {
  color: var(--muted);
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.copy-row code {
  font-size: 0.9rem;
  word-break: break-all;
}

.copy-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  flex: none;
}

.copy-btn:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.success-box {
  text-align: center;
  padding: 1.2rem 0.5rem;
}

.success-box .big {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff7ec;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: 0 14px 34px -12px rgba(42, 26, 18, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
  max-width: min(92vw, 520px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

/* ---------- Checkout demo (pago.html) ---------- */

.page-narrow {
  width: min(560px, 100% - 2rem);
  margin: 2rem auto 3rem;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.demo-banner {
  background: var(--honey-soft);
  border: 1px solid #eccf8f;
  border-radius: var(--radius-xs);
  padding: 0.7rem 0.85rem;
  font-size: 0.84rem;
  color: #7c570f;
  margin-bottom: 1rem;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.status-line:last-of-type {
  border-bottom: none;
}

/* ---------- Admin ---------- */

.admin-shell {
  width: min(1180px, 100% - 2rem);
  margin: 1.6rem auto 4rem;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.admin-tabs {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  border: none;
  background: none;
  padding: 0.6rem 0.85rem;
  border-radius: 10px 10px 0 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.admin-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.panel {
  display: grid;
  gap: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.panel-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.panel-head h2 {
  margin-bottom: 0;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filters select,
.filters input {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.badge-pending {
  background: var(--honey-soft);
  color: #8a5f10;
}

.badge-approved,
.badge-confirmed {
  background: var(--sage-soft);
  color: var(--sage);
}

.badge-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-anon {
  background: #eef0f5;
  color: #4c5870;
}

.admin-list {
  display: grid;
  gap: 0.7rem;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: #fff;
}

.admin-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.admin-item h3 {
  font-size: 1.02rem;
}

.admin-item .meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.admin-item .body {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.45rem;
}

.admin-item .row-actions {
  margin-top: 0.7rem;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.checkbox-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.checkbox-row input {
  margin-top: 0.2rem;
  accent-color: var(--brand);
  width: 18px;
  height: 18px;
}

.login-card {
  width: min(420px, 100% - 2rem);
  margin: 8vh auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.linkish {
  background: none;
  border: none;
  color: var(--brand-dark);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.proof-link {
  font-size: 0.8rem;
}

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

.suggestion-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  max-width: 520px;
}

.search-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.search-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(191, 90, 60, 0.15);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.pager .btn[disabled] {
  opacity: 0.4;
}

.history-page {
  width: min(920px, 100% - 2rem);
  margin: 0 auto 2rem;
}

.history-hero {
  padding: 2.6rem 0 1rem;
}

.history-hero h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.history-hero .muted {
  max-width: 60ch;
}

.history-full-list {
  display: grid;
  gap: 0.8rem;
}

.history-full-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-soft);
}

.history-full-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.history-full-card .history-side {
  gap: 0.35rem;
}

.history-full-card .history-meta {
  margin-top: 0.3rem;
}

.home-hero {
  padding: 3.2rem 0 1.8rem;
}

.home-hero-inner {
  max-width: 820px;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
}

.home-lead {
  font-size: 1.05rem;
  max-width: 62ch;
}

.home-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

.search-toolbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.search-toolbar .search-field {
  max-width: none;
}

.chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.chip-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.chip-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.chip-button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff8f3;
}

.pedido-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pedido-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.pedido-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  text-decoration: none;
}

.pedido-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  background:
    radial-gradient(300px 160px at 80% 20%, rgba(233, 180, 76, 0.35), transparent 70%),
    linear-gradient(135deg, #f7e2d5, #fdf0d3);
  color: var(--brand-dark);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
}

.pedido-category {
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  background: rgba(255, 253, 248, 0.92);
  color: var(--brand-dark);
}

.pedido-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.pedido-body h3 {
  font-size: 1.18rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pedido-body h3 a {
  color: var(--ink);
  text-decoration: none;
}

.pedido-body h3 a:hover {
  text-decoration: underline;
}

.pedido-sub {
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.pedido-amounts {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pedido-amounts strong {
  font-family: var(--font-head);
  font-size: 1.2rem;
}

.pedido-amounts span {
  font-size: 0.82rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-deep);
  appearance: none;
  -webkit-appearance: none;
}

.progress-bar::-webkit-progress-bar {
  background: var(--bg-deep);
  border-radius: 999px;
}

.progress-bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--brand), var(--honey));
  border-radius: 999px;
}

.progress-bar::-moz-progress-bar {
  background: var(--brand);
  border-radius: 999px;
}

.pedido-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--brand-dark);
  text-decoration: none;
}

.pedido-detail-grid {
  display: grid;
  gap: 1.4rem;
}

.pedido-detail-grid > * {
  min-width: 0;
}

.gallery {
  display: grid;
  gap: 0.5rem;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-deep);
}

.gallery-thumbs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.gallery-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  padding: 0;
  width: 68px;
  height: 58px;
  overflow: hidden;
  background: var(--bg-deep);
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--brand);
}

.pedido-heading {
  margin-top: 1.1rem;
}

.pedido-heading h1 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  margin: 0.5rem 0 0.35rem;
  overflow-wrap: anywhere;
}

.pedido-detail-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
}

.detail-progress {
  display: grid;
  gap: 0.5rem;
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.pedido-story {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pedido-story h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pedido-description {
  white-space: pre-line;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.donate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.donate-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.donate-card .amount-field input {
  font-size: 1.4rem;
}

.auth-gate {
  max-width: 640px;
  margin: 1.5rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.auth-gate h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.create-head {
  margin-bottom: 1rem;
}

.create-head h1 {
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.5rem);
}

.upload-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.upload-thumb {
  position: relative;
  width: 88px;
  height: 72px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-remove {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(42, 26, 18, 0.75);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 0.85rem;
}

.account-list {
  display: grid;
  gap: 0.8rem;
}

.account-item {
  display: flex;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
}

.account-cover {
  width: 128px;
  height: 96px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex: none;
  background: var(--bg-deep);
}

.account-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-body {
  flex: 1;
  min-width: 220px;
}

.account-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.account-title h3 {
  font-size: 1.1rem;
}

.admin-pedido-summary {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.admin-cover {
  width: 96px;
  height: 78px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex: none;
  background: var(--bg-deep);
}

.admin-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-thumbs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.admin-thumbs img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.badge-closed {
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.mt-1 {
  margin-top: 1rem;
}

.mt-sm {
  margin-top: 0.7rem;
}

.receipt-cell {
  display: flex;
  gap: 0.35rem;
  min-width: 240px;
}

.receipt-cell .input {
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

/* ---------- Responsive ---------- */

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
  }

  .how-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-backdrop {
    align-items: center;
    padding: 1.5rem;
  }

  .modal {
    border-radius: 24px;
    padding: 1.6rem 1.5rem 1.7rem;
  }
}

@media (min-width: 980px) {
  .fund-card {
    padding: 2.8rem 3rem;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(1080px, 100% - 1.6rem);
  }

  .hero {
    padding-top: 1.4rem;
  }

  .brand span:last-child {
    font-size: 1rem;
  }

  .top-actions .btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.8rem;
  }

  .section-head {
    align-items: flex-start;
  }

  .suggestion-item {
    flex-direction: column;
  }

  .vote-box {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 0.6rem;
  }

  .vote-box .vote-label {
    display: none;
  }

  .history-side {
    text-align: left;
    align-items: flex-start;
  }

  .quick-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 640px) {
  .pedido-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .pedido-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pedido-detail-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .donate-card {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 520px) {
  .account-item {
    flex-direction: column;
  }

  .account-cover {
    width: 100%;
    height: 160px;
  }

  .admin-pedido-summary {
    flex-direction: column;
  }

  .home-hero {
    padding-top: 2rem;
  }
}

.legal-page {
  width: min(820px, 100% - 2rem);
  margin: 0 auto 3rem;
}

.legal-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-soft);
}

.legal-content h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  margin-bottom: 0.35rem;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.legal-content ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.legal-content a {
  color: var(--brand-dark);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.8rem 0;
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.legal-checks {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.legal-checks .checkbox-row {
  font-size: 0.82rem;
}

.legal-checks a {
  color: var(--brand-dark);
}

.legal-required {
  color: var(--danger);
}

.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
}

.lang-switch {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
}
