/* Recebe Fácil V54 — approved mobile visual system (10 references).
   Visual overrides only. Scoped to the corresponding existing screens.
   No camera, QR, OCR, WhatsApp, authentication or database handlers altered. */

:root {
  --rf54-navy: #062648;
  --rf54-deep: #061937;
  --rf54-ink: #0b2451;
  --rf54-muted: #536d8d;
  --rf54-teal: #00ab84;
  --rf54-mint: #6df2c6;
  --rf54-gold: #ffc66f;
  --rf54-ice: #e3f5ff;
  --rf54-card: linear-gradient(135deg, rgba(255,255,255,.78), rgba(221,243,255,.88));
  --rf54-shadow: 0 12px 24px rgba(8,55,94,.13), 0 2px 5px rgba(8,55,94,.06);
}

/* Shared shell; activated only when one of the approved screens is visible. */
html:has(.rf-v54-page) .bg-brand-bg {
  background: radial-gradient(ellipse 70% 27% at 85% 0%, #9bdff9 0%, transparent 78%),
    linear-gradient(155deg, #d3effd 0%, #e9f7ff 38%, #d8f1ff 100%) !important;
}
html:has(.rf-v54-page) main.flex-1.min-w-0 {
  padding: 18px 16px 112px !important;
  min-height: 70vh;
}
.rf-v54-page {
  color: var(--rf54-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.36;
  max-width: 970px !important;
}
.rf-v54-page h2,
.rf-v54-page h3,
.rf-v54-page h4 { color: var(--rf54-ink); letter-spacing: -.035em; }
.rf-v54-page h2 { font-size: clamp(1.35rem, 5.6vw, 2.1rem) !important; font-weight: 850 !important; }
.rf-v54-page input,
.rf-v54-page select,
.rf-v54-page textarea { font-size: 14px !important; min-height: 46px; }
.rf-v54-page input:focus-visible,
.rf-v54-page select:focus-visible,
.rf-v54-page button:focus-visible,
.rf-v54-drawer button:focus-visible,
.rf-v54-resident-modal button:focus-visible {
  outline: 3px solid #09b9a1;
  outline-offset: 2px;
}
.rf-v54-page .bg-white.rounded-3xl,
.rf-v54-page .bg-white.rounded-2xl,
.rf-v54-page .rf-v54-package-card,
.rf-v54-page .rf-v54-resident-card {
  background: var(--rf54-card) !important;
  border: 1.4px solid rgba(255,255,255,.97) !important;
  box-shadow: var(--rf54-shadow) !important;
  border-radius: 25px !important;
}
.rf-v54-page :is(button.bg-brand-green, button.bg-emerald-600),
.rf-v54-resident-modal button.bg-brand-green {
  background: linear-gradient(120deg, #00a87c, #18dbaa 58%, #00ab78) !important;
  color: white !important;
  border-color: rgba(255,255,255,.58) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 14px rgba(0,141,107,.2), inset 0 1px 0 #ffffff66 !important;
}
.rf-v54-page :is(button.bg-brand-navy, button.bg-amber-600) {
  background: linear-gradient(130deg, #07284e, #023a65) !important;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 7px 15px #0c416333 !important;
  border-radius: 18px !important;
}
.rf-v54-page button { transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.rf-v54-page button:active { transform: scale(.985); }

/* Navy architectural header with the approved subtle gold sweep. */
html:has(.rf-v54-page) .rf-v54-header {
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 90% 0%, #075684 0%, transparent 35%),
    linear-gradient(112deg, #041d39 0%, #053456 54%, #041a37 100%) !important;
  border-radius: 0 0 34px 34px;
  box-shadow: 0 7px 24px #01294635;
  min-height: 100px;
  position: sticky;
}
html:has(.rf-v54-page) .rf-v54-header::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 120%;
  height: 82px;
  top: -52px;
  left: -10%;
  border-bottom: 2px solid #ffd27e;
  border-radius: 50%;
  transform: rotate(-8deg);
  box-shadow: 0 7px 14px -11px #ffc563;
  filter: drop-shadow(0 2px 5px #ffc46f);
  opacity: .95;
}
html:has(.rf-v54-page) .rf-v54-header > div {
  padding: 20px 16px 21px !important;
  min-height: 99px;
}
html:has(.rf-v54-page) .rf-v54-header .rf61-header-brand-name > span:first-child {
  font-size: clamp(1.18rem, 4.4vw, 1.65rem);
  font-weight: 850;
  letter-spacing: -.045em;
  white-space: nowrap;
}
html:has(.rf-v54-page) .rf-v54-gold {
  color: #ffc76d;
  text-shadow: 0 0 10px #ffca7270;
}
html:has(.rf-v54-page) .rf-v54-header .rf61-header-role { display: none; }
html:has(.rf-v54-page) .rf-v54-header p.text-xs { margin-top: 4px; font-size: .8rem !important; color: #e1f0fb; }
html:has(.rf-v54-page) .rf-v54-header p.text-xs svg { color: #3ff4bd; }
html:has(.rf-v54-page) .rf-v54-header button[aria-label='Voltar ao painel'] .inline-flex > div {
  width: 58px !important;
  height: 58px !important;
  border: none;
  border-radius: 12px;
  background: #051f3a !important;
  box-shadow: none !important;
}
html:has(.rf-v54-page) .rf-v54-header button[aria-label='Voltar ao painel'] img {
  transform: scale(1.6) translateY(14%);
  filter: drop-shadow(0 2px 4px #ffce7355);
}
html:has(.rf-v54-page) .rf-v54-header button[aria-label='Abrir menu principal'],
html:has(.rf-v54-page) .rf-v54-header .rf61-header-profile,
html:has(.rf-v54-page) .rf-v54-header .rf60-bell {
  width: 42px;
  height: 42px;
  padding: 6px;
  border-radius: 15px;
  background: linear-gradient(135deg,#043965,#06223f) !important;
  border: 1px solid #2f6b90 !important;
  box-shadow: inset 0 1px 2px #ffffff1c, 0 4px 7px #00162966;
}
html:has(.rf-v54-page) .rf-v54-header .rf61-header-profile > div {
  border-radius: 12px;
  background: linear-gradient(135deg,#13dbaa,#008e70);
}

/* Persistent five-item bar: same live handlers and current-tab state. */
html:has(.rf-v54-page) nav.fixed.bottom-0 {
  background: linear-gradient(125deg,rgba(250,253,255,.97),rgba(223,243,255,.96)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #ffffffee !important;
  border-radius: 27px 27px 0 0;
  box-shadow: 0 -8px 23px #5e99b424 !important;
}
html:has(.rf-v54-page) nav.fixed.bottom-0 > div { padding: 7px 8px 10px; gap: 3px; }
html:has(.rf-v54-page) nav.fixed.bottom-0 button {
  min-height: 64px;
  border-radius: 19px;
  padding: 8px 3px;
  color: #2a456c;
}
html:has(.rf-v54-page) nav.fixed.bottom-0 button svg { width: 25px; height: 25px; }
html:has(.rf-v54-page) nav.fixed.bottom-0 button span.text-\[11px\] { font-size: 12px !important; margin-top: 4px; }
html:has(.rf-v54-page) nav.fixed.bottom-0 button.text-brand-green {
  background: linear-gradient(150deg, #c8ffee 0%, #80f1d2 92%);
  color: #034d42 !important;
  box-shadow: 0 6px 15px #00b48c28, inset 0 1px 0 white;
  font-weight: 800;
}
html:has(.rf-v54-page) nav.fixed.bottom-0 button.text-brand-green svg { color:#007c5c; }
html:has(.rf-v54-page) nav.fixed.bottom-0 button.text-brand-green span.absolute { display: none; }

/* Approved left drawer, preserving dynamic role menu and every onClick. */
.rf-v54-drawer-panel {
  width: min(87vw, 410px) !important;
  max-width: 410px !important;
  background: linear-gradient(180deg,#d7effc,#e6f6ff 66%,#d9efff) !important;
  border-radius: 0 0 28px 0;
  border-right: 1px solid #fff !important;
}
.rf-v54-drawer-panel > div[class*='bg-gradient-to-r'] {
  min-height: 104px;
  border-radius: 0 0 32px 0;
  background: radial-gradient(ellipse at 0% 0%,#074870,transparent 62%),linear-gradient(120deg,#061f42,#052c50) !important;
  border-bottom: 1px solid #b88950;
  box-shadow: inset 0 -3px 8px #ffc36d18;
  padding: 18px 15px 24px !important;
}
.rf-v54-drawer-panel > div[class*='bg-gradient-to-r'] > div .inline-flex > div {
  background: #061f40 !important;
  border: none;
}
.rf-v54-drawer-panel > div[class*='bg-gradient-to-r'] img {
  transform: scale(1.7) translateY(14%);
}
.rf-v54-drawer-panel > div[class*='bg-gradient-to-r'] span.font-bold.text-sm { font-size: 16px; }
.rf-v54-drawer-panel > div.flex-1 { padding: 20px 16px !important; }
.rf-v54-drawer-panel .uppercase.tracking-wider { font-size: 11px !important; color:#6887a9; letter-spacing:.08em; }
.rf-v54-drawer-panel button { cursor:pointer; }
.rf-v54-drawer-panel > div.flex-1 button {
  min-height: 49px;
  border-radius: 17px;
}
.rf-v54-drawer-panel > div.flex-1 .space-y-1 button {
  margin: 5px 0;
  padding: 12px 14px;
  background: var(--rf54-card);
  border: 1px solid #fff;
  box-shadow: 0 5px 10px #4c94b222;
  font-size: 14px;
  font-weight: 700;
  color:#0b2650;
}
.rf-v54-drawer-panel > div.flex-1 .space-y-1 button::after {
  content:'›';
  margin-left:auto;
  color:#53749d;
  font-size:25px;
  line-height:0;
}
.rf-v54-drawer-panel > div.flex-1 .space-y-1 button.bg-emerald-50 {
  color:#006b53 !important;
  background:linear-gradient(90deg,#ddfff1,#aaf5df) !important;
  border-left:5px solid #00b98d;
}
.rf-v54-drawer-panel > div.flex-1 .space-y-1 button.bg-emerald-50 svg { color:#00a87d; }
.rf-v54-drawer-panel > div.flex-1 button.bg-brand-green {
  background:linear-gradient(115deg,#02a97a,#0ccfa1) !important;
  border:1px solid #c8fff1;
  border-radius:19px;
  box-shadow:0 8px 14px #007c6f22;
  font-size:14px;
}
.rf-v54-drawer-panel > div.flex-1 button.bg-brand-navy {
  background:linear-gradient(105deg,#0c3b69,#05274c) !important;
  border:1px solid #ffffffbd;
  border-radius:19px;
  font-size:14px;
}
.rf-v54-drawer-panel > div:last-child {
  background:#e3f2fe9c !important;
  border-top:1px solid white;
  padding:18px 16px !important;
}
.rf-v54-drawer-panel > div:last-child button.bg-rose-50 {
  background:#ffffffc5 !important;
  border:1.5px solid #f04462 !important;
  border-radius:14px;
  color:#c91e47;
  font-size:13px;
}

/* 02 + 03: overview and the package list (one original route). */
.rf-v54-pending > div.flex.flex-col:first-of-type { gap:12px; }
.rf-v54-pending > div.flex.flex-col:first-of-type h2 {
  font-size:clamp(1.55rem,6vw,2.2rem)!important;
  line-height:1.1;
}
.rf-v54-pending > div.flex.flex-col:first-of-type p { font-size:13px; color:#496b90; margin-top:5px; }
.rf-v54-pending > div.flex.flex-col:first-of-type button {
  align-self:stretch;
  justify-content:center;
  min-height:50px;
  font-size:15px;
  font-weight:850;
  border-radius:25px !important;
  margin-top:2px;
}
.rf-v54-pending > .grid.grid-cols-1 {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:0 !important;
  background:radial-gradient(ellipse at 15% 0%,#05577b 0%,transparent 62%),linear-gradient(120deg,#041e42,#034267) !important;
  border:1.5px solid #4baee0;
  border-radius:25px;
  box-shadow:var(--rf54-shadow),inset 0 1px #ffffff42;
  overflow:hidden;
  padding:12px 4px;
}
.rf-v54-pending > .grid.grid-cols-1 > div {
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  padding:10px 7px !important;
  border-radius:0 !important;
  text-align:center;
  color:white !important;
  min-width:0;
}
.rf-v54-pending > .grid.grid-cols-1 > div:not(:last-child) { border-right:1px solid #a5d4e178 !important; }
.rf-v54-pending > .grid.grid-cols-1 > div > div:first-child { justify-content:center; margin-bottom:8px; }
.rf-v54-pending > .grid.grid-cols-1 > div > div:first-child span { display:none; }
.rf-v54-pending > .grid.grid-cols-1 > div > div:first-child > div {
  background:#ffffff18!important;
  color:#80f5db!important;
  width:34px;
  height:34px;
}
.rf-v54-pending > .grid.grid-cols-1 > div > .text-2xl {
  font-size:clamp(1.7rem,7vw,2.65rem) !important;
  font-weight:900;
  color:#6ef6c7;
}
.rf-v54-pending > .grid.grid-cols-1 > div:nth-child(2) > .text-2xl { color:#ffffff; }
.rf-v54-pending > .grid.grid-cols-1 > div:nth-child(3) > .text-2xl { color:#ffd080; }
.rf-v54-pending > .grid.grid-cols-1 > div > .text-xs:last-child { color:#e4f6ff !important; font-size:11px; line-height:1.2; }
.rf-v54-pending > div.bg-white.rounded-3xl {
  background:none !important;
  border:0!important;
  padding:0!important;
  box-shadow:none!important;
}
.rf-v54-pending > div.bg-white.rounded-3xl input {
  min-height:50px;
  background:#ffffffa8;
  border:1.5px solid white;
  box-shadow:0 6px 12px #6eaccb25;
  border-radius:25px;
  color:#0c2d53;
  font-size:14px !important;
}
.rf-v54-pending > div.bg-white.rounded-3xl > .flex.items-center { flex-wrap:nowrap; overflow-x:auto; padding:4px 1px 7px; }
.rf-v54-pending > div.bg-white.rounded-3xl > .flex.items-center button {
  white-space:nowrap;
  flex:1 0 auto;
  padding:11px 14px;
  border-radius:22px;
  background:var(--rf54-card);
  border:1px solid #fff;
  box-shadow:0 4px 9px #5894b21f;
  color:#23466e;
  font-size:13px;
}
.rf-v54-pending > div.bg-white.rounded-3xl > .flex.items-center button.bg-brand-navy {
  background:linear-gradient(120deg,#003c67,#032447)!important;
  color:white;
}
.rf-v54-pending > div.bg-white.rounded-3xl > .flex.items-center button.bg-amber-600 { color:#fff; }
.rf-v54-page .rf-v54-package-card {
  padding:13px!important;
  gap:12px;
  border-radius:22px!important;
}
.rf-v54-package-card > div:first-child { min-width:0; }
.rf-v54-package-card > div:first-child > div:first-child {
  width:76px;
  height:80px;
  min-width:76px;
  border-radius:16px;
  border:1px solid #fff;
}
.rf-v54-package-card h4 {
  white-space:normal!important;
  overflow:visible!important;
  font-size:clamp(.91rem,3.7vw,1.13rem);
  line-height:1.18;
  font-weight:850;
}
.rf-v54-package-card p { font-size:12px; }
.rf-v54-package-card .font-mono { font-size:11px; }
.rf-v54-package-card > div:last-of-type button.bg-brand-green {
  padding:11px 13px;
  font-weight:850;
  font-size:13px;
  border-radius:17px!important;
}

/* 04: residents directory. Content numbers remain live, never hard-coded. */
.rf-v54-residents { display:flex; flex-direction:column; gap:16px; }
.rf-v54-residents > * { margin-top:0!important; }
.rf-v54-residents > .flex.flex-col { order:0; }
.rf-v54-residents .rf-v54-resident-stats { order:1; }
.rf-v54-residents > div.w-full.bg-slate-200 { order:2; }
.rf-v54-residents > div.bg-white.rounded-3xl { order:3; }
.rf-v54-residents > div.flex.flex-col h2 { font-size:1.8rem!important; }
.rf-v54-residents > div.flex.flex-col p { color:#597390; font-size:13px; }
.rf-v54-resident-stats {
  background:linear-gradient(118deg,#073b66,#041b3e) !important;
  color:white;
  border-radius:23px;
  padding:20px;
  border:1px solid #58aed5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  box-shadow:var(--rf54-shadow);
}
.rf-v54-resident-stats strong { color:#68f4c6; font-size:2.7rem; font-weight:900; line-height:1; }
.rf-v54-resident-stats span { font-size:14px; padding-left:7px; }
.rf-v54-resident-stats > div:last-child { border-left:1px solid #bee2ff8c; padding-left:15px; font-weight:800; color:#a7ffe2; font-size:14px; white-space:nowrap; }
.rf-v54-residents > div.w-full.bg-slate-200 {
  border-radius:25px;
  padding:4px;
  border:2px solid #fff;
  box-shadow:0 8px 16px #4b86a322;
  background:linear-gradient(115deg,#e6f7ff,#d3edfc)!important;
}
.rf-v54-residents > div.w-full.bg-slate-200 button { border-radius:21px; font-size:14px; min-height:52px; }
.rf-v54-residents > div.w-full.bg-slate-200 button.bg-white {
  color:#083b43!important;
  background:linear-gradient(115deg,#a7ffe2,#23e4ad)!important;
}
.rf-v54-residents > div.flex.flex-col button { min-height:49px; }
.rf-v54-residents > div.flex.flex-col button.bg-white { background:#ebf8ff!important; border:1.3px solid #70a5d5; }
.rf-v54-residents > div.bg-white.rounded-3xl {
  border:0!important;
  box-shadow:none!important;
  background:none!important;
  padding:0!important;
}
.rf-v54-residents > div.bg-white.rounded-3xl > .flex.items-center { display:none; }
.rf-v54-residents > div.bg-white.rounded-3xl input {
  border-radius:25px;
  border:1.5px solid #fff;
  background:#ffffffb7;
  box-shadow:0 5px 11px #4f88b127;
  min-height:50px;
}
.rf-v54-residents .rf-v54-resident-card {
  position:relative;
  border-left:5px solid #00b98d !important;
  background:var(--rf54-card)!important;
  border-radius:22px!important;
  padding:15px!important;
}
.rf-v54-resident-card h4 { font-size:16px; font-weight:850; line-height:1.17; white-space:normal!important; }
.rf-v54-resident-card .bg-emerald-50.rounded-full { color:#00745a; background:#ccf9e8; border-color:#21bf8d; }
.rf-v54-resident-card .bg-slate-100.rounded-md {
  background:#dff0fa!important;
  border:1px solid #d2e6f3;
  font-size:12px;
  color:#4b617d;
  border-radius:10px;
}
.rf-v54-resident-card > div:last-of-type button { padding:9px; border-radius:12px; }

/* 05: resident editing/alias management remains the existing live modal. */
.rf-v54-resident-modal { background:#071b3bbd!important; backdrop-filter:blur(5px); }
.rf-v54-resident-modal > div {
  background:linear-gradient(145deg,#e4f6ff,#d9f0fd)!important;
  border:1.5px solid white!important;
  border-radius:27px!important;
  box-shadow:0 16px 45px #001e405e!important;
}
.rf-v54-resident-profile-card {
  background:linear-gradient(125deg,#e8fff7,#d1f2f0 60%,#c5eeff);
  border:1.5px solid white;
  box-shadow:0 8px 15px #328baa2b;
  border-radius:23px;
  padding:17px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:13px;
  align-items:start;
  margin-bottom:20px;
}
.rf-v54-profile-avatar {
  background:linear-gradient(135deg,#3ce0bb,#007f80);
  color:#fff;
  width:59px;
  height:59px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  font-weight:850;
  box-shadow:inset 0 2px 3px #ffffff66;
}
.rf-v54-profile-details strong { display:block; color:#0a2956; font-size:16px; font-weight:850; line-height:1.23; }
.rf-v54-profile-details p { margin-top:5px; font-size:12px; color:#516c88; overflow-wrap:anywhere; }
.rf-v54-profile-active { color:#077c55; border:1px solid #43d4a4; background:#d6fbea; padding:4px 8px; font-weight:800; border-radius:22px; font-size:11px; }
.rf-v54-resident-modal h3 { color:#0a2652; font-size:18px; font-weight:850; }
.rf-v54-resident-modal label { font-weight:750; color:#133657; font-size:13px; }
.rf-v54-resident-modal input {
  background:#ffffffba;
  border:1px solid #fff;
  border-radius:13px;
  font-size:14px;
  min-height:45px;
  box-shadow:0 2px 6px #4e94b014;
}
.rf-v54-resident-modal [aria-label='Apelidos cadastrados'] {
  display:flex;
  flex-direction:column;
  gap:9px;
}
.rf-v54-resident-modal [aria-label='Apelidos cadastrados'] > span {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  min-height:45px;
  width:100%;
  background:linear-gradient(120deg,#fff,#e6f5ff)!important;
  border:1.4px solid #fff;
  box-shadow:0 5px 9px #3774aa1c;
  border-radius:17px;
  font-size:14px;
  font-weight:750;
  color:#112d5b;
}
.rf-v54-resident-modal [aria-label='Apelidos cadastrados'] button { color:#e83854; }
.rf-v54-resident-modal #resident-alias + button {
  background:#d6ffee!important;
  border:1.5px solid #00bd88;
  color:#006c56!important;
  padding:10px 14px;
  border-radius:14px;
}
.rf-v54-resident-modal #resident-alias { width:100%; flex:initial; }
.rf-v54-resident-modal div.flex:has(> #resident-alias) { flex-direction:column; }
.rf-v54-resident-modal #resident-alias + button { min-height:45px; min-width:150px; justify-content:center; align-self:center; }
.rf-v54-resident-modal:has(#resident-alias) #resident-alias { margin-bottom:5px; }
@media (max-width:420px) {
  .rf-v54-resident-profile-card { grid-template-columns:auto minmax(0,1fr); }
  .rf-v54-profile-active { grid-column:2; justify-self:start; }
}

/* 06: detected label, confidence warning and resident selection. */
.rf-v54-identify > .flex.items-center,
.rf-v54-receive > .flex.items-center,
.rf-v54-confirm > .flex.items-center { margin-bottom:19px; }
.rf-v54-identify > .flex.items-center h2,
.rf-v54-receive > .flex.items-center h2,
.rf-v54-confirm > .flex.items-center h2 { font-size:1.65rem!important; }
.rf-v54-identify > .flex.items-center button:first-child,
.rf-v54-receive > .flex.items-center button:first-child,
.rf-v54-confirm > .flex.items-center button:first-child {
  background:#f8fcffcc !important;
  border:1.5px solid white;
  box-shadow:0 5px 12px #438ab124;
  border-radius:15px;
  padding:12px;
  min-height:45px;
}
.rf-v54-identify > div.bg-white.rounded-3xl {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.rf-v54-identify div.bg-indigo-50\/90 {
  background:var(--rf54-card)!important;
  border:1.3px solid white!important;
  border-radius:25px;
  padding:18px;
  box-shadow:var(--rf54-shadow);
}
.rf-v54-identify div.bg-indigo-50\/90 h4 {
  color:#062b57;
  font-size:15px;
  font-weight:850;
  text-transform:none;
  letter-spacing:-.02em;
}
.rf-v54-identify div.bg-indigo-50\/90 .grid > div {
  background:#ffffffb2!important;
  border:1px solid #fff;
  border-radius:13px;
  padding:10px;
}
.rf-v54-identify div.bg-indigo-50\/90 .grid > div span:last-child { font-size:13px; font-weight:850; }
.rf-v54-identify div.bg-amber-50\/80 {
  background:linear-gradient(105deg,#fff2d8,#fffaf0)!important;
  border:1.5px solid #ffc85d!important;
  border-radius:22px;
  box-shadow:0 6px 12px #bc9a391c;
  padding:19px;
  margin-top:17px;
}
.rf-v54-identify div.bg-amber-50\/80 h4 { color:#895107; font-size:16px; }
.rf-v54-identify div.bg-amber-50\/80 p { color:#765629; font-size:13px; line-height:1.4; }
.rf-v54-identify .bg-slate-100.gap-1 { background:#d5ebf6!important; padding:5px; border:1px solid white; }
.rf-v54-identify .bg-slate-100.gap-1 button { border-radius:14px; min-height:39px; }
.rf-v54-identify input { border:1.4px solid white!important; background:#ffffffad; border-radius:17px; }
.rf-v54-identify .rf-v54-resident-card { padding:15px; }
.rf-v54-identify .rf-v54-resident-card button.bg-brand-green { font-size:13px; }

/* 07: OCR progress. Decorative steps never change scanning behavior. */
.rf-v54-receive [data-testid='receive-analyzing-view'] {
  background:radial-gradient(ellipse at 50% 24%,#c8fff6 0%,transparent 51%),var(--rf54-card)!important;
  border:1.5px solid #fff!important;
  border-radius:27px!important;
  box-shadow:var(--rf54-shadow);
  padding:34px 20px!important;
}
.rf-v54-receive [data-testid='receive-analyzing-view'] > div.relative.w-20 {
  width:135px!important;
  height:135px!important;
  border:14px solid #98f2df9c;
  border-radius:50%;
  background:#ffffffca;
  box-shadow:inset 0 2px 9px #cdfcef,0 10px 20px #25a48b21;
}
.rf-v54-receive [data-testid='receive-analyzing-view'] .animate-spin {
  width:80px!important;
  height:80px!important;
  border-width:6px!important;
}
.rf-v54-receive [data-testid='receive-analyzing-view'] h4 { font-size:clamp(1.65rem,6vw,2.2rem); }
.rf-v54-receive [data-testid='receive-analyzing-view'] p { color:#5c7390; font-size:14px; line-height:1.43; }
.rf-v54-analysis-steps {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  padding:8px;
  background:linear-gradient(110deg,#e6f8ff,#d6f2fb);
  border:1.5px solid white;
  border-radius:23px;
  box-shadow:0 6px 13px #2b9fc020;
}
.rf-v54-analysis-steps > div {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:77px;
  border-radius:17px;
  padding:8px 4px;
  color:#59708d;
}
.rf-v54-analysis-steps > div > span { font-size:27px; line-height:1; }
.rf-v54-analysis-steps > div:first-child > span { background:#00ab80; color:white; border-radius:50%; width:30px; height:30px; font-size:21px; line-height:30px; }
.rf-v54-analysis-steps > div.is-current { background:linear-gradient(120deg,#d2fff3,#b9f4e9); color:#005d49; }
.rf-v54-analysis-steps > div.is-current > span { color:#00ad86; animation:rf54-pulse 1.5s ease-in-out infinite; }
.rf-v54-analysis-steps strong { font-size:11px; line-height:1.25; font-weight:800; }
@keyframes rf54-pulse { 50% { opacity:.5; transform:rotate(22deg); } }
.rf-v54-receive [data-testid='receive-analyzing-view'] .w-32.h-20 {
  width:min(95%,315px)!important;
  height:235px!important;
  opacity:1!important;
  border-radius:20px;
  border:1.5px solid #fff;
  box-shadow:var(--rf54-shadow);
}
.rf-v54-receive [data-testid='receive-analyzing-view'] .w-32.h-20 img { object-fit:contain; background:#cdeef4; }
.rf-v54-receive [data-testid='receive-analyzing-view'] .w-32.h-20 > div.absolute { opacity:.25; }

/* 08, 09, 10: identification, label, code and WhatsApp preview. */
.rf-v54-confirm > div.bg-white.rounded-3xl {
  background:var(--rf54-card)!important;
  padding:19px!important;
  border-radius:26px!important;
}
.rf-v54-confirm .bg-emerald-50.border-emerald-200\/80 {
  background:linear-gradient(105deg,#e4fff4,#c0f4e5)!important;
  border:1.5px solid #58e4bb!important;
  border-radius:21px;
  padding:16px;
}
.rf-v54-confirm .bg-emerald-50.border-emerald-200\/80 h4 { color:#05573f; font-size:16px; font-weight:850; }
.rf-v54-confirm .bg-emerald-50.border-emerald-200\/80 p { color:#0a7658; font-size:13px; }
.rf-v54-confirm .aspect-\[16\/9\] {
  max-height:none!important;
  aspect-ratio:16/10;
  border-radius:22px;
  border:2px solid white;
  box-shadow:var(--rf54-shadow)!important;
  background:#d9f2fb;
}
.rf-v54-confirm .aspect-\[16\/9\] button { height:100%; width:100%; }
.rf-v54-confirm .bg-blue-50\/70 {
  background:linear-gradient(130deg,#e7f5ff,#d9eeff)!important;
  border:1.5px solid white!important;
  border-radius:23px;
  box-shadow:0 5px 11px #5494bc1e;
  padding:16px;
}
.rf-v54-confirm .bg-blue-50\/70 h4,
.rf-v54-confirm .bg-blue-50\/70 .uppercase { text-transform:none; letter-spacing:0; font-size:15px; font-weight:850; color:#0a2a5a; }
.rf-v54-confirm .bg-blue-50\/70 .grid > div {
  background:#ffffff9d!important;
  border:1px solid #c9e6ff!important;
  border-radius:15px;
  padding:12px;
}
.rf-v54-confirm .bg-blue-50\/70 .grid > div span:last-child { font-size:14px; font-weight:800; }
.rf-v54-confirm .bg-slate-50.rounded-2xl { background:#ffffffa1!important; border:1px solid white!important; border-radius:20px; }
.rf-v54-confirm .bg-emerald-950\/5 {
  background:var(--rf54-card)!important;
  border:1.5px solid white!important;
  border-radius:24px;
  padding:17px;
  box-shadow:0 7px 14px #4b96af20;
}
.rf-v54-confirm .bg-emerald-950\/5 > div:first-child {
  gap:12px;
  flex-wrap:wrap;
  color:#092954;
  font-size:15px;
}
.rf-v54-confirm .bg-emerald-950\/5 > div:first-child .bg-amber-50 {
  padding:7px 12px;
  border-radius:25px;
  color:#a7600b;
  background:#fff9e7;
  border:1px solid #ffd77e;
  font-size:11px;
}
.rf-v54-confirm .bg-emerald-950\/5 > .bg-white {
  padding:14px!important;
  background:#ffffffbf!important;
  border:1px solid white!important;
  border-radius:19px;
  font-size:14px;
  line-height:1.6;
}
.rf-v54-confirm .bg-emerald-950\/5 img { max-height:270px!important; object-fit:contain; border-radius:17px; }
.rf-v54-confirm input[type=checkbox] { width:19px; height:19px; accent-color:#157bde; }
.rf-v54-confirm button.bg-brand-green { min-height:52px; font-size:14px; }

@media (max-width:640px) {
  html:has(.rf-v54-page) main.flex-1.min-w-0 { padding:19px 13px 110px!important; }
  .rf-v54-page { width:100%; }
  html:has(.rf-v54-page) .rf-v54-header > div { gap:7px; padding:17px 12px 19px!important; }
  html:has(.rf-v54-page) .rf-v54-header > div > div:first-child { gap:8px; }
  html:has(.rf-v54-page) .rf-v54-header button[aria-label='Voltar ao painel'] .inline-flex > div { width:49px!important; height:49px!important; }
  html:has(.rf-v54-page) .rf-v54-header > div > div:last-child { gap:6px; }
  html:has(.rf-v54-page) .rf-v54-header button[aria-label='Abrir menu principal'],
  html:has(.rf-v54-page) .rf-v54-header .rf61-header-profile,
  html:has(.rf-v54-page) .rf-v54-header .rf60-bell { width:38px; height:38px; }
  .rf-v54-pending > .grid.grid-cols-1 > div > .text-xs:last-child { font-size:10px; }
  .rf-v54-package-card { display:grid!important; grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .rf-v54-package-card > div:first-child { gap:9px; min-width:0; }
  .rf-v54-package-card > div:first-child > div:first-child { width:69px; min-width:69px; height:79px; }
  .rf-v54-package-card > div:last-of-type { justify-self:end; align-self:center!important; gap:0; }
  .rf-v54-package-card > div:last-of-type button.bg-brand-green { padding:9px!important; font-size:12px; }
  .rf-v54-package-card > div:last-of-type button:not(.bg-brand-green) { padding:6px; }
  .rf-v54-package-card .text-\[11px\].flex-wrap { gap:3px; }
  .rf-v54-residents > div.flex.flex-col > div:last-child { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
  .rf-v54-residents > div.flex.flex-col > div:last-child button { min-width:0; padding:9px!important; font-size:12px!important; }
  .rf-v54-resident-card { display:grid!important; grid-template-columns:1fr auto; gap:7px; }
  .rf-v54-resident-card > div:last-child { align-self:end!important; }
  .rf-v54-confirm .grid.grid-cols-2 { gap:9px; }
}
@media (max-width:375px) {
  html:has(.rf-v54-page) .rf-v54-header .rf61-header-brand-name > span:first-child { font-size:1.07rem; }
  .rf-v54-package-card { grid-template-columns:1fr; }
  .rf-v54-package-card > div:last-of-type { justify-self:end; }
  .rf-v54-resident-stats strong { font-size:2.1rem; }
  .rf-v54-resident-stats span { font-size:11px; }
}
@media (min-width:768px) {
  html:has(.rf-v54-page) main.flex-1.min-w-0 { padding:25px 30px 45px!important; }
  .rf-v54-pending > div.flex.flex-col:first-of-type { flex-direction:row; align-items:center; }
  .rf-v54-pending > div.flex.flex-col:first-of-type button { align-self:center; }
  .rf-v54-page > div.bg-white.rounded-3xl { padding:23px!important; }
  .rf-v54-residents > div.flex.flex-col { display:flex; }
}
@media (prefers-reduced-motion:reduce) {
  .rf-v54-page button,.rf-v54-drawer button { transition:none!important; }
}
