:root {
  --bg: #f4f1ea;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-soft: #f7f2ea;
  --text: #1f2937;
  --muted: #667085;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.12);
  --error: #b42318;
  --error-soft: rgba(180, 35, 24, 0.1);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.11), transparent 28%),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.09), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #f7f3ec 52%, #f1efe8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

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

img {
  max-width: 100%;
  display: block;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #5eead4, #0f766e 65%, #134e4a 100%);
  box-shadow: 0 0 0 7px rgba(15, 118, 110, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 600;
  transition: 180ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.nav .user-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  color: var(--text);
  background: rgba(15, 118, 110, 0.07);
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #115e59);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  display: grid;
  gap: 24px;
}

.hero,
.card,
.table-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 40%);
}

.hero,
.card {
  padding: 30px;
}

.hero h1,
.card h1,
.card h2 {
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.card h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.card h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.hero {
  display: grid;
  gap: 18px;
  padding: 40px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(247, 244, 237, 0.92));
}

.hero p,
.card p,
.muted {
  color: var(--muted);
}

.hero p {
  max-width: 58ch;
  font-size: 1.05rem;
}

.hero-actions,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.28);
  filter: saturate(1.05);
}

.button:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 3px;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.grid {
  display: grid;
  gap: 20px;
}

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

label {
  display: grid;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.1);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

strong {
  color: var(--text);
}

.flash {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
}

.flash-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(21, 128, 61, 0.18);
}

.flash-error {
  color: var(--error);
  background: var(--error-soft);
  border-color: rgba(180, 35, 24, 0.18);
}

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

.stat {
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 248, 243, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-md);
}

.stat strong {
  display: block;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

thead {
  background: rgba(15, 118, 110, 0.06);
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.56);
}

.table-wrap {
  overflow: auto;
  padding: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.card > * + *,
.hero > * + * {
  margin-top: 0;
}

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

.card p:last-child,
.hero p:last-child {
  margin-bottom: 0;
}

.card a:not(.button),
.table-wrap a {
  color: var(--accent-strong);
  font-weight: 700;
}

.card a:not(.button):hover,
.table-wrap a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .topbar {
    border-radius: 28px;
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .grid-2,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero,
  .card {
    padding: 24px;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar {
    position: static;
  }

  .nav a,
  .button,
  button {
    width: 100%;
  }

  .hero-actions,
  .actions {
    flex-direction: column;
  }

  .hero {
    padding: 24px 22px;
  }
}

/* Nova divisão: fluxo guiado e consistente */
.quick-guide {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(94, 234, 212, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

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

.quick-guide__title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
}

.quick-guide__title div,
.quick-guide__title small,
.quick-guide__steps span,
.quick-guide__steps small {
  display: grid;
}

.quick-guide__title small,
.quick-guide__steps small {
  color: var(--muted);
  font-weight: 500;
}

.quick-guide__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-guide__steps > li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.quick-guide__steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.quick-guide .mode-help-grid {
  margin: 0;
}

.quick-guide .help-warning {
  margin: 0;
}

.account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.field-block {
  grid-template-rows: auto 52px minmax(38px, auto);
  align-content: start;
}

.field-block input,
.field-block select {
  height: 52px;
}

.receipt-reader {
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
  gap: 18px 24px;
  border-style: solid;
}

.receipt-dropzone {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 14px 16px;
  border: 2px dashed rgba(15, 118, 110, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: 180ms ease;
}

.receipt-dropzone:hover,
.receipt-dropzone:focus-within {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
}

.receipt-dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1.55rem;
  font-weight: 400;
}

.receipt-dropzone > span:last-child {
  display: grid;
  gap: 2px;
}

.receipt-dropzone small,
.receipt-reader__privacy {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.receipt-reader__privacy {
  grid-column: 1 / -1;
  margin: -4px 0 0 !important;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mobile-flow-bar {
  display: none;
}

.builder-panel[data-flow-step] {
  scroll-margin-top: 18px;
}

.page-builder .content,
.builder-page,
.builder-panel,
.quick-guide,
.account-fields,
.receipt-reader {
  min-width: 0;
}

button:disabled,
.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

@media (max-width: 860px) {
  .account-fields,
  .receipt-reader {
    grid-template-columns: 1fr;
  }

  .receipt-reader__privacy {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  html,
  body.page-builder {
    overflow-x: hidden;
  }

  .page-builder {
    padding-bottom: 92px;
  }

  .page-builder .shell {
    width: 100%;
    padding: 10px 10px 32px;
  }

  .page-builder .page-header {
    padding: 8px 8px 2px;
  }

  .page-builder .page-header h1 {
    font-size: 2.15rem;
  }

  .page-builder .topbar {
    gap: 10px;
    padding: 12px;
    border-radius: 22px;
  }

  .page-builder .nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
  }

  .page-builder .nav::-webkit-scrollbar {
    display: none;
  }

  .page-builder .nav a {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.06);
  }

  .page-builder .builder-panel {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .builder-panel__head h2 {
    font-size: 1.65rem;
  }

  .quick-guide {
    padding: 15px;
  }

  .quick-guide__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .quick-guide__steps > li {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 9px 5px;
    text-align: center;
  }

  .quick-guide__steps small {
    display: none;
  }

  .quick-guide__steps strong {
    font-size: 0.78rem;
  }

  .quick-guide .mode-help-grid {
    grid-template-columns: 1fr;
  }

  .field-block {
    grid-template-rows: auto 56px auto;
  }

  .field-block input,
  .field-block select,
  .participant-entry input,
  .item-entry input {
    height: 56px;
  }

  .location-picker {
    padding: 15px;
  }

  .receipt-reader {
    padding: 16px;
  }

  .receipt-dropzone {
    min-height: 82px;
  }

  .allocation-modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .allocation-mode {
    width: 100%;
    min-height: 50px;
    padding: 0 7px;
    font-size: 0.84rem;
  }

  .mobile-flow-bar {
    position: fixed;
    z-index: 30;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 10px 10px 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(16px);
  }

  .mobile-flow-bar span {
    display: grid;
    min-width: 0;
  }

  .mobile-flow-bar small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.68);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-flow-bar strong {
    color: #fff;
    font-size: 1.05rem;
  }

  .mobile-flow-bar button {
    width: auto;
    min-width: 132px;
    min-height: 52px;
    padding: 0 18px;
  }
}

.page-builder .content,
.page-summary .content {
  gap: 20px;
}

.page-header,
.summary-header {
  text-align: left;
  padding: 4px 4px 10px;
}

.page-header h1,
.summary-header h1 {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 5vw, 3.3rem);
  letter-spacing: -0.05em;
}

.page-header p,
.summary-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.builder-page {
  gap: 22px;
}

.builder-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-md);
}

.builder-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.builder-panel__head h2 {
  margin: 4px 0 6px;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.builder-panel__head p {
  margin: 0;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.profile-card {
  height: 100%;
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.profile-avatar-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #115e59);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.18);
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-preview img[hidden] {
  display: none;
}

.profile-photo-button {
  width: fit-content;
  min-height: 42px;
}

.profile-remove-photo {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  color: var(--error);
  font-size: 0.86rem;
  cursor: pointer;
}

.profile-remove-photo input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
}

.help-box {
  margin-bottom: 20px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 20px;
  background: rgba(240, 253, 250, 0.72);
}

.help-box summary {
  padding: 16px 18px;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.help-box__content {
  padding: 0 18px 18px;
  color: var(--muted);
}

.help-box__content p {
  margin: 8px 0;
}

.mode-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.mode-help-grid > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
}

.mode-help-grid span,
.field-help {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
}

.help-warning {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.1);
  color: #854d0e;
}

.input-uppercase {
  text-transform: uppercase;
}

.location-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.location-picker p {
  margin: 2px 0 0;
  color: var(--muted);
}

.location-picker > .field-help,
.location-status,
.location-results {
  grid-column: 1 / -1;
}

.location-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.location-status.is-success {
  color: var(--success);
  font-weight: 700;
}

.location-status.is-error {
  color: var(--error);
  font-weight: 700;
}

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

.location-result {
  display: flex;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
}

.location-result span {
  display: grid;
  gap: 2px;
}

.location-result small {
  color: var(--muted);
  font-weight: 500;
}

.location-result b {
  color: var(--accent);
  white-space: nowrap;
}

.location-result.is-selected {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.location-result.is-selected strong,
.location-result.is-selected small,
.location-result.is-selected b {
  color: #fff;
}

.summary-place {
  display: grid;
  gap: 2px;
  width: fit-content;
  margin: 14px auto 0;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.08);
}

.summary-place span {
  color: var(--muted);
  font-size: 0.88rem;
}

.receipt-reader {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px dashed rgba(15, 118, 110, 0.38);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.78), rgba(239, 246, 255, 0.72));
}

.receipt-reader h3 {
  margin: 4px 0 6px;
  font-size: 1.35rem;
}

.receipt-reader p,
.receipt-reader ul {
  margin: 6px 0 0;
  color: var(--muted);
}

.receipt-reader ul {
  padding-left: 20px;
  font-size: 0.88rem;
}

.receipt-reader__action {
  display: grid;
  gap: 10px;
}

.receipt-file-button {
  width: 100%;
}

.receipt-reader__status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.receipt-reader__status.is-success {
  color: var(--success);
  font-weight: 700;
}

.receipt-reader__status.is-error {
  color: var(--error);
  font-weight: 700;
}

.receipt-reader__progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}

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

.eyebrow {
  display: inline-block;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.participant-entry,
.item-entry {
  display: grid;
  gap: 16px;
}

.participant-entry {
  grid-template-columns: minmax(0, 1fr) 160px;
}

.item-entry {
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.7fr)) 220px;
  align-items: end;
}

.item-entry__wide {
  grid-column: 1 / 2;
}

.item-entry__action {
  display: flex;
}

.item-entry__action .button {
  width: 100%;
}

.participants-list {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 74px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: #0f172a;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.participant-chip strong {
  color: inherit;
}

.participants-list + .soft-info {
  margin-top: 18px;
}

.soft-info,
.tip-box {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.soft-info.is-error {
  color: var(--error);
  background: var(--error-soft);
  border-color: rgba(180, 35, 24, 0.18);
}

.tip-box {
  color: #24415f;
}

.items-stack,
.allocation-list,
.summary-people {
  display: grid;
  gap: 16px;
}

.builder-item-card,
.allocation-card,
.summary-person {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.builder-item-card__head,
.allocation-card__head,
.summary-person__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.builder-item-card__head h3,
.allocation-card__head h3,
.summary-person__head h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.builder-item-card__head p,
.allocation-card__head p,
.summary-person__head p {
  margin: 0;
  color: var(--muted);
}

.builder-item-card__price,
.allocation-card__head strong {
  color: #0ea5e9;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.builder-item-card__actions {
  display: flex;
  margin-top: 14px;
}

.item-edit-button {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.86rem;
}

.icon-delete {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.icon-delete:hover {
  transform: none;
  box-shadow: none;
}

.summary-total {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1ea4d7, #46b7eb);
  color: #fff;
  box-shadow: 0 24px 54px rgba(14, 165, 233, 0.26);
}

.total-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.total-box__row.is-grand {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.4rem;
}

.allocation-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.allocation-mode {
  min-height: 44px;
  border-radius: 14px;
  border: 2px solid #25a4d7;
  background: transparent;
  color: #1494cb;
  box-shadow: none;
}

.allocation-mode.is-active {
  background: #25a4d7;
  color: #fff;
}

.allocation-hint {
  margin-top: 12px;
  color: var(--muted);
}

.allocation-people {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.allocation-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(235, 248, 255, 0.55);
}

.allocation-toggle {
  width: 100%;
  min-height: 46px;
  justify-content: flex-start;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: none;
}

.allocation-toggle.is-selected {
  background: #25a4d7;
  color: #fff;
}

.allocation-equal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.allocation-equal-value {
  min-width: 128px;
  text-align: right;
  font-weight: 800;
  color: #0f766e;
}

.allocation-person__name {
  font-weight: 700;
}

.stepper,
.percent-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.stepper button,
.percent-field span {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 12px;
  box-shadow: none;
}

.stepper button {
  background: transparent;
  border: 2px solid #25a4d7;
  color: #1494cb;
}

.stepper input,
.percent-field input {
  width: 88px;
  min-height: 40px;
  text-align: center;
}

.percent-field span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.allocation-footer,
.summary-person__meta,
.summary-actions,
.builder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.allocation-footer {
  margin-top: 14px;
  color: var(--muted);
}

.builder-actions {
  margin-top: 10px;
}

.summary-header {
  text-align: center;
}

.summary-total {
  text-align: center;
  padding: 34px 24px;
}

.summary-total span,
.summary-total p {
  display: block;
}

.summary-total strong {
  display: block;
  margin: 10px 0;
  color: #fff;
  font-size: clamp(3rem, 7vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.summary-person__value {
  text-align: right;
}

.summary-person__value span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-person__value strong {
  font-size: 2rem;
  color: #2563eb;
  letter-spacing: -0.04em;
}

.summary-items {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.summary-breakdown {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
  display: grid;
  gap: 10px;
}

.summary-breakdown__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-breakdown__row.is-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.summary-breakdown__row.is-total strong {
  font-size: 1.25rem;
  color: #2563eb;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}

.summary-item-row small {
  color: var(--muted);
  margin-left: 6px;
}

.button-warm {
  background: linear-gradient(135deg, #ff8a3d, #ffad6a);
  box-shadow: 0 10px 28px rgba(255, 138, 61, 0.28);
}

.summary-actions .button {
  flex: 1 1 220px;
}

.summary-person__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.summary-person__actions .button {
  flex: 1 1 220px;
}

.summary-back {
  text-align: center;
  padding: 10px 0 0;
}

.summary-back a {
  color: var(--text);
  font-weight: 700;
}

.qr-dialog {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.qr-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.qr-dialog__content {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.qr-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.qr-dialog__head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.qr-dialog__close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  box-shadow: none;
}

.qr-dialog__content img {
  width: min(100%, 280px);
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.qr-dialog__content p {
  margin: 0 0 10px;
  color: var(--muted);
  text-align: center;
}

.qr-dialog__content a {
  display: block;
  text-align: center;
  word-break: break-all;
  color: var(--accent-strong);
  font-weight: 700;
}


.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-cropper {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.avatar-cropper::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}

.avatar-cropper__content {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.avatar-cropper__content h2 {
  margin: 0;
  font-size: 1.35rem;
}

.avatar-cropper__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.avatar-cropper__stage video,
.avatar-cropper__stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-cropper__stage video {
  transform: scaleX(-1);
}

.avatar-cropper__stage canvas {
  cursor: grab;
  touch-action: none;
}

.avatar-cropper__stage canvas:active {
  cursor: grabbing;
}

.avatar-cropper__stage video[hidden],
.avatar-cropper__stage canvas[hidden] {
  display: none;
}

.avatar-cropper__mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
}

.avatar-cropper__zoom {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.avatar-cropper__zoom[hidden] {
  display: none;
}

.avatar-cropper__zoom input {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent-strong);
}

.avatar-cropper__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.avatar-cropper__status.is-error {
  color: var(--error);
  font-weight: 700;
}

.avatar-cropper__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.avatar-cropper__actions .button[hidden],
.avatar-cropper__actions button[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .participant-entry,
  .item-entry,
  .allocation-modes,
  .mode-help-grid,
  .receipt-reader {
    grid-template-columns: 1fr;
  }

  .location-picker,
  .location-results {
    grid-template-columns: 1fr;
  }

  .location-picker > * {
    grid-column: 1;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .item-entry__action {
    width: 100%;
  }

  .summary-person__head,
  .builder-item-card__head,
  .allocation-card__head,
  .allocation-person {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-person__value {
    text-align: left;
  }

  .allocation-equal-row {
    flex-direction: column;
    align-items: stretch;
  }

  .allocation-equal-value {
    min-width: 0;
    text-align: left;
  }

  .summary-person__actions,
  .summary-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .profile-avatar-editor {
    grid-template-columns: 1fr;
  }

  .profile-photo-button {
    width: 100%;
  }
}

/* Home: hero com ilustração e cartões de modo */
.hero-split {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  justify-items: start;
}

.hero-split h1 {
  max-width: 14ch;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
}

.hero-split p {
  max-width: 46ch;
}

.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.hero-art svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(15, 23, 42, 0.12));
}

.mode-card {
  display: grid;
  gap: 12px;
  justify-items: start;
  border-top: 4px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.12);
}

.mode-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-card__link {
  font-weight: 800;
}

.mode-card--quick {
  border-top-color: #d97706;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 55%),
    var(--surface);
}

.mode-card--quick .mode-card__tag {
  color: #92400e;
  background: rgba(251, 191, 36, 0.24);
}

.mode-card--quick .mode-card__link {
  color: #b45309;
}

.mode-card--account {
  border-top-color: var(--accent);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 55%),
    var(--surface);
}

.mode-card--account .mode-card__tag {
  color: var(--accent-strong);
  background: rgba(15, 118, 110, 0.14);
}

.mode-card--account .mode-card__link {
  color: var(--accent-strong);
}

@media (max-width: 860px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-split h1,
  .hero-split p {
    max-width: none;
  }

  .hero-art {
    order: -1;
  }

  .hero-art svg {
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  .hero-copy {
    justify-items: stretch;
  }

  .hero-copy .pill {
    justify-self: start;
  }
}

/* Paleta fixa por participante: mesma cor no chip, na divisao e no resumo */
.tone-1 { --tone: #e11d48; --tone-ink: #9f1239; --tone-soft: rgba(225, 29, 72, 0.12); }
.tone-2 { --tone: #0284c7; --tone-ink: #075985; --tone-soft: rgba(2, 132, 199, 0.12); }
.tone-3 { --tone: #7c3aed; --tone-ink: #5b21b6; --tone-soft: rgba(124, 58, 237, 0.12); }
.tone-4 { --tone: #ea580c; --tone-ink: #9a3412; --tone-soft: rgba(234, 88, 12, 0.12); }
.tone-5 { --tone: #059669; --tone-ink: #065f46; --tone-soft: rgba(5, 150, 105, 0.12); }
.tone-6 { --tone: #db2777; --tone-ink: #9d174d; --tone-soft: rgba(219, 39, 119, 0.12); }
.tone-7 { --tone: #2563eb; --tone-ink: #1e40af; --tone-soft: rgba(37, 99, 235, 0.12); }
.tone-8 { --tone: #ca8a04; --tone-ink: #854d0e; --tone-soft: rgba(202, 138, 4, 0.14); }
.tone-9 { --tone: #0d9488; --tone-ink: #115e59; --tone-soft: rgba(13, 148, 136, 0.12); }
.tone-10 { --tone: #65a30d; --tone-ink: #3f6212; --tone-soft: rgba(101, 163, 13, 0.14); }

.participant-chip {
  background: var(--tone, #0f172a);
  box-shadow: 0 10px 22px var(--tone-soft, rgba(15, 23, 42, 0.14));
}

.allocation-person {
  border-color: var(--tone-soft, rgba(56, 189, 248, 0.25));
  border-left: 5px solid var(--tone, #38bdf8);
  background: var(--tone-soft, rgba(235, 248, 255, 0.55));
}

.allocation-person__name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--tone-ink, var(--text));
}

.allocation-person__name::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--tone, #38bdf8);
}

.allocation-toggle {
  gap: 9px;
}

.allocation-toggle::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--tone, #38bdf8);
}

.allocation-toggle.is-selected {
  background: var(--tone, #25a4d7);
  color: #fff;
}

.allocation-toggle.is-selected::before {
  background: rgba(255, 255, 255, 0.92);
}

.allocation-equal-value {
  color: var(--tone-ink, var(--text));
}

.summary-person {
  border-left: 6px solid var(--tone, var(--accent));
}

.summary-person__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tone-ink, var(--text));
}

.summary-person__head h2::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--tone, var(--accent));
}

.summary-person__value strong {
  color: var(--tone-ink, #2563eb);
}


/* Itens e totais escritos numa folha de caderno */
.notepad {
  position: relative;
  margin-top: 18px;
  padding: 16px 26px 20px 62px;
  color: #1f2937;
  font-family: "Segoe Print", "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 4px 14px 4px 4px;
  background-color: #fffdf3;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 33px,
    rgba(37, 99, 235, 0.18) 33px 34px
  );
  background-position: 0 16px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  transform: rotate(-0.35deg);
}

.notepad::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 44px;
  width: 2px;
  background: rgba(225, 29, 72, 0.4);
}

.notepad::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 18px;
  background-image: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.16) 0 5px, transparent 5.5px);
  background-size: 18px 46px;
  background-repeat: repeat-y;
}

.notepad .items-stack {
  display: block;
  margin: 0;
  gap: 0;
}

.notepad-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.notepad-item__text {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.notepad-item__text:hover,
.notepad-item__remove:hover {
  transform: none;
  box-shadow: none;
}

.notepad-item__text:hover .notepad-item__name {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.notepad-item__name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notepad-item__meta {
  flex: 0 0 auto;
  color: rgba(31, 41, 55, 0.5);
  font-size: 0.8em;
}

.notepad-item__price {
  color: #1e3a8a;
  font-weight: 700;
}

.notepad-item__remove {
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(31, 41, 55, 0.32);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

.notepad-item__remove:hover {
  background: rgba(180, 35, 24, 0.12);
  color: var(--error);
}

.notepad .total-box {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.items-stack:not(:empty) + .total-box {
  border-top: 1px dashed rgba(15, 23, 42, 0.22);
}

.total-box__row {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 0;
  font-weight: 700;
}

.total-box__row strong {
  color: #1e3a8a;
  letter-spacing: -0.01em;
}

.total-box__row.is-grand {
  margin-top: 0;
  padding-top: 0;
  min-height: 34px;
  border-top: 2px solid rgba(15, 23, 42, 0.32);
  font-size: 1.15rem;
}

.total-box__row.is-grand strong {
  color: #b42318;
  font-size: 1.3rem;
}

@media (max-width: 640px) {
  .notepad {
    padding: 14px 16px 18px 52px;
  }

  .notepad::before {
    left: 38px;
  }

  .notepad::after {
    left: 9px;
    width: 16px;
    background-size: 16px 46px;
  }

  .notepad-item {
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 8px;
  }

  .notepad-item__meta {
    display: none;
  }
}

/* Campos numericos digitados: sem os botoes de incremento do navegador */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Participantes que entraram no grupo mas nao consumiram nada */
.summary-idle {
  display: grid;
  gap: 6px;
  padding: 18px 22px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.summary-idle strong {
  color: var(--text);
}

.summary-idle p {
  margin: 0;
  font-weight: 700;
}

.summary-idle small {
  font-size: 0.84rem;
}

/* Botoes de compartilhamento: cor propria para nao sumirem no card */
.button-whatsapp,
.button-qr {
  color: #fff;
  font-weight: 800;
  border: 0;
}

.button-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 12px 26px rgba(18, 140, 126, 0.32);
}

.button-qr {
  background: linear-gradient(135deg, #4f46e5, #312e81);
  box-shadow: 0 12px 26px rgba(49, 46, 129, 0.3);
}

.button-whatsapp:hover,
.button-qr:hover {
  filter: brightness(1.06);
}

/* Campo Modo: cor destacada conforme o modo selecionado */
.access-mode-select {
  font-weight: 800;
  border-width: 2px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.access-mode-select.is-quick {
  color: #9a3412;
  border-color: #ea580c;
  background-color: rgba(251, 191, 36, 0.14);
}

.access-mode-select.is-account {
  color: var(--accent-strong);
  border-color: var(--accent);
  background-color: rgba(15, 118, 110, 0.12);
}

/* Font Awesome: espacamento e alinhamento dos icones */
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav a i,
.button i,
button i,
.mode-card__tag i,
.mode-card__link i {
  flex: 0 0 auto;
  font-size: 0.95em;
  line-height: 1;
}

.receipt-dropzone__icon i {
  font-size: 1.15rem;
}

.button-whatsapp i {
  font-size: 1.15em;
}

/* Marca no cabecalho */
.brand::before {
  content: none;
}

/* Tela de entrar / criar conta */
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: 24px;
  align-items: stretch;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 40px 36px;
  border-radius: var(--radius-xl);
  color: #eafaf6;
  background:
    radial-gradient(circle at 80% 15%, rgba(46, 224, 165, 0.28), transparent 45%),
    linear-gradient(160deg, #134e4a, #103b3a 55%, #0b2c2b);
  box-shadow: var(--shadow-lg);
}

.auth-aside__mark {
  width: 60px;
  height: 60px;
  margin-bottom: 4px;
}

.auth-aside h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #fff;
}

.auth-aside p {
  margin: 0;
  max-width: 46ch;
  color: rgba(234, 250, 246, 0.78);
}

.auth-perks {
  display: grid;
  gap: 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.auth-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: rgba(234, 250, 246, 0.92);
}

.auth-perks i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 12px;
  background: rgba(46, 224, 165, 0.16);
  color: #2ee0a5;
  font-size: 0.9rem;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow-lg);
}

.auth-card__head h2 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.auth-card__head p {
  margin: 0;
  color: var(--muted);
}

.input-icon {
  position: relative;
  display: block;
}

.input-icon > i {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.input-icon input {
  width: 100%;
  padding-left: 46px;
}

.input-icon:has([data-password-toggle]) input {
  padding-right: 52px;
}

.input-icon__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
}

.input-icon__toggle:hover {
  color: var(--accent-strong);
  background: rgba(15, 118, 110, 0.08);
  transform: translateY(-50%);
  box-shadow: none;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--accent-strong);
  font-weight: 800;
}

.auth-switch--muted {
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    padding: 26px 24px;
  }

  .auth-aside h1 {
    max-width: none;
  }

  .auth-perks {
    display: none;
  }
}

/* Modo travado em Rapido para quem nao esta logado */
.field-block__label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.access-mode-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(234, 88, 12, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #9a3412;
  font-weight: 800;
}

.access-mode-locked > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.access-mode-locked .fa-lock {
  color: rgba(154, 52, 18, 0.55);
  font-size: 0.85rem;
}

/* Ajustes finos de alinhamento das telas de entrar/criar conta */
.auth-card .grid {
  gap: 16px;
}

.auth-card .auth-switch {
  margin-top: auto;
}

.auth-card .auth-switch + .auth-switch {
  margin-top: 0;
}

.auth-aside p,
.auth-aside h1 {
  width: 100%;
}

.auth-perks {
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

@media (max-width: 860px) {
  .auth-card .auth-switch,
  .auth-perks {
    margin-top: 0;
  }
}

/* Item ativo do menu no verde do sistema */
.nav a.is-active {
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.26);
}

.nav a.is-active:hover,
.nav a.is-active:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  filter: brightness(1.06);
}

.nav .user-profile-link.is-active {
  background: rgba(15, 118, 110, 0.16);
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Logotipo com nome no cabecalho */
.brand__logo {
  display: block;
  width: auto;
  height: 34px;
}

@media (max-width: 640px) {
  .brand__logo {
    height: 28px;
  }
}

/* Leitura da conta: bloco bloqueado para visitante e opcoes de envio */

.receipt-reader__copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.receipt-reader__privacy i {
  margin-right: 7px;
  color: var(--accent);
}

.receipt-locked {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.08);
}

.receipt-locked__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.receipt-locked strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.receipt-locked p {
  margin: 0 0 14px;
  color: var(--muted);
}

.receipt-locked__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .receipt-locked {
    flex-direction: column;
    gap: 14px;
  }

  .receipt-locked__actions .button {
    width: 100%;
  }
}

/* Camera e arquivo com o mesmo peso visual */
.receipt-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

button.receipt-dropzone {
  width: 100%;
  min-height: 76px;
  justify-content: flex-start;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  text-align: left;
  box-shadow: none;
}

button.receipt-dropzone:hover {
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
}

.receipt-dropzone strong {
  font-weight: 800;
}


/* Guia inicial como linha do tempo, com seta animada ate o proximo passo.
   Abaixo de 640px o layout compacto de hoje e mantido. */
@media (min-width: 641px) {
  .quick-guide__steps {
    position: relative;
    gap: 34px;
  }

  .quick-guide__steps::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 2px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(
      to right,
      rgba(15, 118, 110, 0.3) 0 7px,
      transparent 7px 14px
    );
  }

  .quick-guide__steps > li {
    position: relative;
    z-index: 1;
  }

  .quick-guide__steps > li:not(:last-child)::after {
    content: "\f061";
    position: absolute;
    top: 50%;
    right: -25px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--accent);
    transform: translate(50%, -50%);
    animation: guide-arrow 1.6s ease-in-out infinite;
  }

  .quick-guide__steps > li:nth-child(2)::after {
    animation-delay: 0.35s;
  }

  .quick-guide__steps b {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.06);
  }
}

@keyframes guide-arrow {
  0%,
  100% {
    transform: translate(50%, -50%) translateX(-4px);
    opacity: 0.45;
  }
  50% {
    transform: translate(50%, -50%) translateX(4px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-guide__steps > li::after {
    animation: none;
  }
}

/* Dica dos modos de divisao no mesmo amarelo do aviso do modo rapido */
.tip-box {
  display: grid;
  gap: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #854d0e;
}

.tip-box > strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
}

.tip-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tip-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.tip-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(133, 77, 14, 0.5);
}

.tip-list b {
  font-weight: 800;
}

/* Passos ilustrados: pessoa -> lista de itens -> divisao */
.quick-guide__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-guide__steps b {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0.07));
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.quick-guide__steps b em {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 640px) {
  .quick-guide__steps b {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 0.92rem;
  }

  .quick-guide__steps b em {
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }
}
