:root {
  --navy: #0b3a5b;
  --navy-2: #0e4a73;
  --teal: #148a94;
  --green: #12b76a;
  --green-2: #16a34a;
  --bg: #dce6ee;
  --card: #fff;
  --text: #1a2b3c;
  --muted: #5d7082;
  --line: #c9d6e1;
  --danger: #c0392b;
  --radius: 14px;
  --sidebar: 240px;
  --sidebar-collapsed: 76px;
  --shadow: 0 1px 2px rgba(11, 58, 91, 0.06), 0 10px 28px rgba(11, 58, 91, 0.1);
  --shadow-sm: 0 1px 3px rgba(11, 58, 91, 0.08);
  --shadow-in: inset 0 1px 2px rgba(11, 58, 91, 0.04);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); background: var(--bg); }
a { color: var(--teal); text-decoration: none; }
img { max-width: 100%; }

.muted { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; padding: 0.75rem 1rem; cursor: pointer;
  font-weight: 600; font-size: 1rem;
}
.btn-primary { background: var(--green); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost {
  background: #fff; color: var(--navy); border: 1px solid var(--line);
  padding: 0.4rem 0.8rem; width: auto; box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn.is-loading,
button.is-loading {
  pointer-events: none; opacity: 0.84; cursor: wait;
}
.btn.is-loading::after {
  content: ""; width: 0.95em; height: 0.95em; margin-left: 0.5rem;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; flex: 0 0 auto;
  animation: nfeja-spin 0.65s linear infinite;
}
@keyframes nfeja-spin { to { transform: rotate(360deg); } }
form[data-locked="1"] { cursor: wait; }

.recurso-plano { position: relative; }
.recurso-plano.is-locked {
  cursor: not-allowed;
}
.recurso-plano.is-locked input,
.recurso-plano.is-locked select,
.recurso-plano.is-locked textarea,
.recurso-plano.is-locked .btn {
  background: #e8eef3; color: #7a8a99; cursor: not-allowed;
}
.recurso-plano-balloon {
  position: absolute; left: 50%; bottom: calc(100% - 0.15rem);
  transform: translateX(-50%) translateY(-0.2rem);
  background: #3d4c5c; color: #fff; padding: 0.42rem 0.7rem;
  border-radius: 8px; font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; z-index: 8; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity 0.12s;
  box-shadow: var(--shadow);
}
.recurso-plano.is-locked:hover .recurso-plano-balloon,
.recurso-plano.is-locked:focus-within .recurso-plano-balloon {
  opacity: 1; visibility: visible;
}
.recurso-plano-balloon::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  margin-left: -6px; border: 6px solid transparent; border-top-color: #3d4c5c;
}

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.7rem 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.3rem; padding: 0.7rem 0.8rem;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; background: #fff;
  box-shadow: var(--shadow-in); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 138, 148, 0.18);
}
fieldset {
  border: 0; border-radius: 12px; margin: 0 0 1.1rem; padding: 1rem 1.1rem 0.4rem;
  background: #f4f8fb;
}
fieldset legend {
  font-weight: 700; color: var(--navy); padding: 0 0.2rem; font-size: 0.95rem;
}
.check { display: flex; gap: 0.5rem; align-items: center; margin: 0.4rem 0; }
.check input { width: auto; margin: 0; }
.switch {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 0.35rem 0; cursor: pointer; user-select: none;
  color: var(--text); font-size: 0.92rem; font-weight: 600;
}
.switch.switch-block { display: flex; align-items: center; margin-top: 1.55rem; }
.switch-legal {
  display: flex; align-items: flex-start; gap: 0.7rem;
  margin: 1.05rem 0 1.15rem; font-weight: 500; line-height: 1.45;
}
.switch-legal .switch-ui { margin-top: 0.12rem; }
.switch-txt { flex: 1; min-width: 0; font-size: 0.88rem; color: var(--text); }
.switch-txt a { font-weight: 700; }
.switch input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
  pointer-events: none;
}
.switch-ui {
  position: relative; flex: 0 0 auto; width: 44px; height: 26px;
  border-radius: 999px; background: #b7c4d0;
  box-shadow: var(--shadow-in); transition: background 0.18s ease;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(11, 58, 91, 0.25);
  transition: transform 0.18s ease;
}
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui {
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.28);
}
.switches-row { display: flex; gap: 1.1rem 1.4rem; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.grid-2, .grid-3 { display: grid; gap: 0 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin: 0.8rem 0; }
.alert-danger { background: #fdecea; color: var(--danger); }
.alert-warn {
  background: #fff8eb; color: #8a5b00; border: 1px solid #f5d78e;
  border-radius: 12px; padding: 0.85rem 1rem; margin: 0 0 1rem; line-height: 1.45;
}
.alert-warn a { color: #8a5b00; font-weight: 650; }
.alert-ok { background: #e8f8ef; color: var(--green-2); border-radius: 12px; padding: 0.85rem 1rem; margin: 0 0 1rem; }
.btn-danger {
  background: #b42318; color: #fff; border-color: #b42318;
}
.btn-danger:hover { background: #912018; border-color: #912018; color: #fff; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.cancel-form { margin-top: 0.75rem; max-width: 36rem; }
.cancel-form textarea { min-height: 5rem; }

.auth-body {
  position: relative;
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(20, 138, 148, 0.42), transparent 58%),
    linear-gradient(180deg, #0b3a5b 0%, #071820 100%);
  overflow-x: hidden;
}
.auth-atmosphere {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(520px 280px at 12% 88%, rgba(18, 183, 106, 0.14), transparent 60%),
    radial-gradient(480px 260px at 88% 18%, rgba(20, 138, 148, 0.2), transparent 55%),
    repeating-linear-gradient(
      -18deg,
      transparent 0,
      transparent 22px,
      rgba(255, 255, 255, 0.015) 22px,
      rgba(255, 255, 255, 0.015) 23px
    );
}
.auth-wrap {
  position: relative; z-index: 1;
  width: min(428px, calc(100% - 2rem)); padding: 2rem 0;
}
.auth-wrap:has(.auth-wide) { width: min(880px, calc(100% - 2rem)); }
.auth-wide { width: min(880px, 100%); }
.auth-card {
  position: relative;
  background: var(--card); border-radius: 16px; padding: 1.45rem 1.5rem 1.7rem;
  border: 0; box-shadow: 0 18px 48px rgba(7, 24, 32, 0.35);
}
.auth-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: 16px 16px 0 0;
}

/* —— Onboarding (marca em evidência, caminhos assimétricos) —— */
.onboard {
  font-family: "Sora", "Segoe UI", sans-serif;
  color: #e8f0f4;
  animation: onboard-in 0.55s ease both;
}
@keyframes onboard-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.onboard-hero {
  text-align: center;
  margin-bottom: 1.6rem;
  padding: 0.2rem 0.5rem 0.4rem;
}
.onboard .auth-brand {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.15rem;
  letter-spacing: -0.04em;
}
.onboard .auth-brand img {
  width: clamp(48px, 6vw, 58px);
  height: clamp(48px, 6vw, 58px);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.onboard .auth-brand:hover { color: #9fe3d0; }
.onboard .auth-brand-wrap { margin: 0 0 1.1rem; }
.onboard .pwa-install {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.onboard-step {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7fd4c4;
}
.onboard-title {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}
.onboard-title em {
  font-style: normal;
  color: #7fd4c4;
  background: linear-gradient(120deg, #7fd4c4, #12b76a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.onboard-lead {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(232, 240, 244, 0.78);
  font-weight: 400;
}
.onboard-paths {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}
.onboard-path {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.25rem;
  min-height: 100%;
  animation: onboard-path-in 0.6s ease both;
}
.onboard-path.is-primary {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, #f3faf8 100%);
  color: var(--text);
  box-shadow: 0 22px 50px rgba(7, 24, 32, 0.38);
  border: 1px solid rgba(127, 212, 196, 0.45);
}
.onboard-path.is-primary::before {
  content: "";
  position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--teal), var(--green));
}
.onboard-path.is-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  color: #e8f0f4;
  backdrop-filter: blur(10px);
  animation-delay: 0.08s;
}
@keyframes onboard-path-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.onboard-path-top { margin-bottom: 1rem; padding-left: 0.35rem; }
.onboard-path.is-secondary .onboard-path-top { padding-left: 0; }
.onboard-badge {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(18, 183, 106, 0.14);
  color: var(--green-2);
}
.onboard-badge.is-mute {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(232, 240, 244, 0.75);
}
.onboard-path h2 {
  margin: 0 0 0.4rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.onboard-path.is-secondary h2 { color: #fff; }
.onboard-path-top p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.onboard-path.is-secondary .onboard-path-top p {
  color: rgba(232, 240, 244, 0.72);
}
.onboard-form { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.onboard-field { margin: 0.55rem 0; color: var(--muted); font-weight: 600; }
.onboard-path.is-secondary .onboard-field { color: rgba(232, 240, 244, 0.7); }
.onboard-file {
  position: relative;
  display: block;
  margin: 0.2rem 0 0.65rem;
  cursor: pointer;
}
.onboard-file input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  cursor: pointer; margin: 0; padding: 0;
}
.onboard-file-ui {
  display: flex; align-items: center; gap: 0.85rem;
  min-height: 5.2rem; padding: 0.95rem 1.05rem;
  border: 1.5px dashed rgba(20, 138, 148, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbfc, #eef7f6);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.onboard-file:hover .onboard-file-ui,
.onboard-file.is-drag .onboard-file-ui {
  border-color: var(--teal);
  background: #e8f7f4;
  transform: translateY(-1px);
}
.onboard-file.has-file .onboard-file-ui {
  border-style: solid;
  border-color: var(--green);
  background: #e8f8ef;
}
.onboard-file-icon {
  flex: 0 0 auto;
  width: 2.6rem; height: 2.6rem;
  border-radius: 10px;
  background:
    linear-gradient(145deg, var(--teal), var(--navy));
  box-shadow: 0 6px 14px rgba(11, 58, 91, 0.22);
  position: relative;
}
.onboard-file-icon::before,
.onboard-file-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
}
.onboard-file-icon::before {
  width: 1.1rem; height: 2px; border-radius: 2px;
}
.onboard-file-icon::after {
  width: 2px; height: 1.1rem; border-radius: 2px;
}
.onboard-file-copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.onboard-file-copy strong {
  font-size: 0.95rem; color: var(--navy); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.onboard-file-copy small { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.onboard-cta { margin-top: auto; padding-top: 0.35rem; }
.onboard-path .btn-primary {
  box-shadow: 0 8px 20px rgba(18, 183, 106, 0.35);
}
.onboard-path .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 183, 106, 0.42);
}
.onboard-path.is-secondary .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.onboard-path.is-secondary .btn-secondary:hover {
  border-color: #7fd4c4;
  color: #7fd4c4;
  background: rgba(255, 255, 255, 0.06);
}
.onboard-back {
  text-align: center;
  margin: 1.05rem 0 0;
}
.onboard-back a {
  color: rgba(232, 240, 244, 0.75);
  font-size: 0.88rem;
  font-weight: 600;
}
.onboard-back a:hover { color: #7fd4c4; }
.onboard-hero-cert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 28rem;
  margin: 1.15rem auto 0;
  padding: 0.85rem 1rem;
  text-align: left;
  border-radius: 12px;
  background: rgba(18, 183, 106, 0.12);
  border: 1px solid rgba(127, 212, 196, 0.35);
  backdrop-filter: blur(8px);
  animation: onboard-path-in 0.5s ease 0.1s both;
}
.onboard-hero-cert .onboard-badge { margin: 0.1rem 0 0; flex: 0 0 auto; }
.onboard-hero-cert-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.onboard-hero-cert-body strong {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}
.onboard-hero-cert-body span {
  color: rgba(232, 240, 244, 0.72);
  font-size: 0.82rem;
  font-weight: 500;
}
.onboard-empresa .onboard-hero {
  margin-bottom: 1.35rem;
  padding-bottom: 0.35rem;
}
.onboard-empresa .onboard-title {
  font-size: clamp(2rem, 5vw, 2.85rem);
}
.onboard-panel {
  background: #fff;
  color: var(--text);
  border-radius: 18px;
  padding: 1.5rem 1.55rem 1.65rem;
  box-shadow: 0 22px 50px rgba(7, 24, 32, 0.38);
  border: 1px solid rgba(127, 212, 196, 0.35);
  animation: onboard-path-in 0.55s ease both;
}
.onboard-section {
  margin: 0 0 1.35rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid #e4ecf2;
}
.onboard-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0.2rem;
}
.onboard-section-title {
  margin: 0 0 0.65rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.onboard-panel .onboard-field.is-cnpj input {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.onboard-panel .onboard-cta {
  margin-top: 0.4rem;
  box-shadow: 0 8px 20px rgba(18, 183, 106, 0.35);
}
.onboard-panel .onboard-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 183, 106, 0.42);
}
.onboard-empresa .alert { margin-bottom: 1rem; }
@media (max-width: 820px) {
  .onboard-paths { grid-template-columns: 1fr; }
  .onboard-path.is-primary { order: 0; }
  .onboard-path.is-secondary { order: 1; }
  .onboard-hero-cert { flex-direction: column; gap: 0.45rem; }
}
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  margin: 0.35rem 0 0.35rem; color: var(--navy);
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
}
.auth-brand-wrap { text-align: center; margin: 0.35rem 0 0.85rem; }
.pwa-install {
  display: none; margin: 0.45rem auto 0; width: auto; padding: 0.4rem 0.85rem;
  font-size: 0.82rem; font-weight: 700; color: #fff; background: var(--navy);
  border: 0; border-radius: 999px; cursor: pointer;
}
html.pwa-installable .pwa-install { display: inline-flex; }
html.pwa-installable .auth-brand { cursor: pointer; }
html.pwa-installed .pwa-install { display: none; }
.pwa-install:hover { background: var(--teal); }
.auth-brand img { width: 42px; height: 42px; object-fit: contain; }
.auth-brand:hover { color: var(--teal); }
.auth-eyebrow {
  text-align: center; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--teal); font-weight: 800; font-size: 0.72rem; margin: 0 0 0.35rem;
}
.auth-card h1 { text-align: center; margin: 0.15rem 0 0.25rem; color: var(--navy); font-size: 1.45rem; }
.auth-card > .muted { text-align: center; margin: 0 0 0.4rem; }

.senha-wrap { position: relative; margin-top: 0.3rem; }
.senha-wrap input { margin-top: 0; padding-right: 2.85rem; }
.senha-olho {
  position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
  border-radius: 8px; padding: 0;
}
.senha-olho:hover, .senha-olho:focus-visible { color: var(--navy); outline: 0; }
.senha-olho:focus-visible { box-shadow: 0 0 0 3px rgba(20, 138, 148, 0.18); }
.senha-olho svg { width: 1.25rem; height: 1.25rem; pointer-events: none; }
.senha-forca { margin: 0.15rem 0 0.55rem; }
.senha-forca-bar {
  height: 6px; border-radius: 99px; background: #e4ecf2; overflow: hidden;
}
.senha-forca-bar > span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  transition: width 0.2s ease, background 0.2s ease;
}
.senha-forca.is-fraca .senha-forca-bar > span { width: 28%; background: var(--danger); }
.senha-forca.is-media .senha-forca-bar > span { width: 52%; background: #d97706; }
.senha-forca.is-boa .senha-forca-bar > span { width: 78%; background: var(--teal); }
.senha-forca.is-forte .senha-forca-bar > span { width: 100%; background: var(--green); }
.senha-forca-txt {
  margin: 0.4rem 0 0; font-size: 0.82rem; font-weight: 700; color: var(--muted);
}
.senha-forca.is-fraca .senha-forca-txt { color: var(--danger); }
.senha-forca.is-media .senha-forca-txt { color: #b45309; }
.senha-forca.is-boa .senha-forca-txt { color: var(--teal); }
.senha-forca.is-forte .senha-forca-txt { color: var(--green-2); }
.senha-regras {
  list-style: none; margin: 0.35rem 0 0; padding: 0;
}
.senha-regras li {
  position: relative; padding: 0.1rem 0 0.1rem 1.2rem;
  font-size: 0.82rem; color: var(--muted); line-height: 1.35;
}
.senha-regras li::before {
  content: ""; position: absolute; left: 0; top: 0.48rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff;
}
.senha-regras li.is-ok { color: var(--green-2); }
.senha-regras li.is-ok::before {
  border-color: var(--green); background: var(--green);
  box-shadow: inset 0 0 0 2px #fff;
}
.senha-match { margin: 0.15rem 0 0.6rem; font-size: 0.82rem; font-weight: 600; }
.senha-match.is-ok { color: var(--green-2); }
.senha-match.is-bad { color: var(--danger); }
.btn-secondary {
  background: #fff; color: var(--navy); border: 1px solid var(--line); width: 100%;
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

.choice-grid { display: grid; gap: 1rem; margin-top: 1.2rem; }
.choice-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.choice-card strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 0.25rem; }
.choice-card .muted { text-align: left; margin: 0.35rem 0 0.8rem; }
.cert-banner {
  background: #e8f8ef; border: 1px solid #b6e9c9; border-radius: 8px;
  padding: 0.85rem 1rem; margin: 1rem 0; text-align: left;
}
.cert-banner strong { color: var(--green-2); }
input[type="file"] { padding: 0.45rem; background: #fff; }
input[readonly] { background: #f4f7fa; color: var(--text); }

.app-body { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); background: var(--navy); color: #fff; padding: 1.2rem 0.85rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  box-shadow: 4px 0 24px rgba(11, 58, 91, 0.18);
  z-index: 2; flex: 0 0 var(--sidebar); transition: width 0.2s ease, flex-basis 0.2s ease, padding 0.2s ease;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 700; font-size: 1.15rem; min-width: 0; }
.brand img { width: 36px; height: 36px; object-fit: contain; background: transparent; border-radius: 8px; flex: 0 0 auto; }
.nav-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar nav a, .sidebar-collapse {
  display: flex; align-items: center; gap: 0.7rem;
  color: #d5e4ee; padding: 0.62rem 0.7rem; border-radius: 10px;
  white-space: nowrap; overflow: hidden;
}
.sidebar nav a.active, .sidebar nav a:hover, .sidebar-collapse:hover {
  background: var(--navy-2); color: #fff;
}
.sidebar nav a.is-disabled { opacity: 0.45; pointer-events: none; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.45rem; }
.sidebar-collapse {
  border: 0; background: transparent; cursor: pointer; font: inherit; width: 100%; text-align: left;
}
.pill { display: inline-block; background: #123f5c; color: #9fe7c3; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.78rem; text-transform: uppercase; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar {
  display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem;
  padding: 1rem 1.5rem; background: #fff; border-bottom: 0;
  box-shadow: var(--shadow-sm); z-index: 1;
}
.topbar-user { display: flex; align-items: center; gap: 0.8rem; margin-left: auto; }
.content { padding: 1.5rem 1.6rem 2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card, .panel, .table-wrap, .empty-card {
  background: var(--card); border: 0; border-radius: var(--radius);
  padding: 1.2rem 1.35rem; box-shadow: var(--shadow);
}
.panel { padding: 1.35rem 1.45rem 1.5rem; }
.panel .btn-primary { margin-top: 0.3rem; }
.card h2 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--navy); }
.stat { font-size: 1.6rem; font-weight: 700; margin: 0.3rem 0; }

/* —— Início (hero + tiles) —— */
.home { width: 100%; max-width: none; }
.home-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  margin: 0 0 1.35rem;
  padding: 1.1rem 1.35rem 1.15rem;
  border-radius: 18px;
  color: #e8f0f4;
  background:
    radial-gradient(520px 220px at 90% 0%, rgba(20, 138, 148, 0.45), transparent 55%),
    linear-gradient(135deg, #0b3a5b 0%, #0e4a73 48%, #0a2f48 100%);
  box-shadow: 0 16px 36px rgba(11, 58, 91, 0.22);
  animation: onboard-in 0.45s ease both;
}
.home-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.home-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7fd4c4;
}
.content .home-title,
.home-hero .home-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}
.home-lead {
  margin: 0;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(232, 240, 244, 0.82);
  white-space: nowrap;
}
.home-lead strong { color: #fff; font-weight: 700; }
a.home-lead-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(232, 240, 244, 0.9);
  text-decoration: none;
  border-bottom: 0;
  transition: color 0.15s ease;
}
a.home-lead-link:hover { color: #fff; }
.home-lead-cta {
  margin-left: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #7fd4c4;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.home-chip {
  text-decoration: none;
  cursor: pointer;
}
a.home-chip:hover { filter: brightness(1.12); }
.home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.home-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}
.home-chip.is-homo { background: rgba(20, 138, 148, 0.28); border-color: rgba(127, 212, 196, 0.45); }
.home-chip.is-prod { background: rgba(18, 183, 106, 0.22); border-color: rgba(18, 183, 106, 0.45); }
.home-chip.is-plan { color: #cfe8e2; }
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.95rem;
}
a.home-tile { color: inherit; text-decoration: none; }
.home-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 10.5rem;
  padding: 1.2rem 1.25rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 214, 225, 0.55);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: onboard-path-in 0.5s ease both;
}
.home-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), var(--green));
}
.home-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11, 58, 91, 0.14);
  border-color: rgba(20, 138, 148, 0.35);
}
.home-tile.is-metric {
  background: linear-gradient(165deg, #fff 0%, #f3faf8 100%);
}
.home-tile.is-alert {
  background: linear-gradient(165deg, #fff8f6 0%, #fff 70%);
  border-color: rgba(192, 57, 43, 0.22);
}
.home-tile.is-alert::before {
  background: linear-gradient(180deg, #e07a5f, var(--danger));
}
.home-tile.is-plan::before {
  background: linear-gradient(180deg, var(--navy), var(--teal));
}
.home-tile-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.home-tile.is-alert .home-tile-label { color: var(--danger); }
.home-tile-value {
  margin: 0.15rem 0 0.1rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.1;
}
.home-tile-value.is-sm { font-size: 1.35rem; }
.home-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
}
.home-tile-text {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
}
.home-tile-cta {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal);
}
.home-tile:hover .home-tile-cta { color: var(--navy); }
.home-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: auto 0 0;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.home-tile-actions a { color: var(--teal); }
.home-tile-actions a:hover { color: var(--navy); }
.home-grid > :nth-child(2) { animation-delay: 0.04s; }
.home-grid > :nth-child(3) { animation-delay: 0.08s; }
.home-grid > :nth-child(4) { animation-delay: 0.12s; }
.home-grid > :nth-child(5) { animation-delay: 0.16s; }
@media (max-width: 1100px) {
  .home-lead,
  a.home-lead-link {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}
@media (max-width: 720px) {
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-hero-meta { justify-content: flex-start; }
}
.ok { color: var(--green-2); }
.warn { color: var(--danger); }
.emit-quick-links {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin: 0.65rem 0 0.2rem;
}
.emit-modal {
  border: 0; padding: 0; border-radius: 16px;
  width: min(560px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  box-shadow: 0 24px 48px rgba(11, 58, 91, 0.28);
  background: transparent;
}
.emit-modal::backdrop { background: rgba(11, 58, 91, 0.45); }
.emit-modal-card {
  position: relative;
  margin: 0; padding: 1.15rem 1.25rem 1.2rem;
  background: #fff; border-radius: 16px;
  overflow: auto; max-height: calc(100vh - 2rem);
}
.emit-modal-busy {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.7rem; padding: 1rem; text-align: center;
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy); font-weight: 650; font-size: 0.95rem;
  border-radius: 16px; cursor: wait; user-select: none;
}
.emit-modal-busy.hidden { display: none; }
.emit-modal-busy-spin {
  width: 1.65rem; height: 1.65rem; border-radius: 50%;
  border: 2.5px solid rgba(11, 58, 91, 0.18);
  border-top-color: var(--navy);
  animation: emit-spin 0.7s linear infinite;
}
@keyframes emit-spin { to { transform: rotate(360deg); } }
.emit-modal-card header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem; margin-bottom: 0.75rem;
}
.emit-modal-card header h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.emit-modal-card footer {
  display: flex; justify-content: flex-end; gap: 0.55rem; margin-top: 1rem;
  flex-wrap: wrap;
}
#hint-transmitir { margin: 0.35rem 0 0; }
.resumo-box .warn { margin-top: 0.35rem; font-size: 0.88rem; }
.emit-modal-erro {
  margin: 0 0 0.75rem; padding: 0.65rem 0.8rem;
  border-radius: 10px; background: #fef3f2; color: #b42318;
  border: 1px solid #fecdca; font-size: 0.9rem; line-height: 1.35;
}
.emit-modal-dup { margin: 0 0 0.85rem; }
.btn-primary { box-shadow: 0 6px 14px rgba(18, 183, 106, 0.28); }
.btn-primary.btn-inline, .btn-secondary.btn-inline { width: auto; padding: 0.6rem 1rem; box-shadow: var(--shadow-sm); }
.btn-primary.btn-inline:hover { box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; color: var(--navy); }
.filters, .panel-filters {
  display: flex; gap: 0.6rem; margin: 0 0 1rem; flex-wrap: wrap;
  background: var(--card); padding: 0.85rem 1rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.filters input, .filters select { margin: 0; width: auto; min-width: 180px; flex: 1; }
.table-wrap { overflow: auto; padding: 0; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #e6eef4; font-size: 0.92rem; }
table.data th { color: var(--muted); font-weight: 600; background: #f4f8fb; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f7fbfc; }
.pill-soft {
  display: inline-flex; align-items: center;
  background: #eef6f8; color: var(--navy);
  border-radius: 999px; padding: 0.18rem 0.6rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  margin-right: 0.2rem; text-transform: uppercase;
}
.pill-cliente { background: #e8f8ef; color: #0f7a4a; }
.pill-forn { background: #eef3ff; color: #2f4f9a; }
.pill-transp { background: #fff4e5; color: #9a5b12; }
.pill-warn { background: #fdecea; color: var(--danger); text-transform: none; }
.checks-row, .switches-row { display: flex; gap: 1.1rem 1.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.empty-card { text-align: center; padding: 2.6rem 1.5rem; }
.empty-illu {
  width: 56px; height: 56px; margin: 0 auto 0.85rem;
  border-radius: 16px; background: #e8f2f7;
  position: relative;
}
.empty-illu::before {
  content: ""; position: absolute; left: 50%; top: 14px;
  width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: #9bb4c6;
}
.empty-illu::after {
  content: ""; position: absolute; left: 50%; bottom: 12px;
  width: 26px; height: 14px; margin-left: -13px;
  border-radius: 12px 12px 4px 4px; background: #9bb4c6;
}
.content h1 { color: var(--navy); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.page-head-pessoas { margin-bottom: 1.25rem; }
.plan-meter {
  display: flex; align-items: center; gap: 0.65rem;
  margin-top: 0.65rem; max-width: 280px;
}
.plan-meter-bar {
  flex: 1; height: 6px; border-radius: 99px; background: #d7e3ec; overflow: hidden;
}
.plan-meter-bar span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transition: width 0.25s ease;
}
.plan-meter.is-mid .plan-meter-bar span { background: linear-gradient(90deg, #d4a017, #e3b53c); }
.plan-meter.is-high .plan-meter-bar span { background: linear-gradient(90deg, #c0392b, #e07468); }
.plan-meter-label { color: var(--muted); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }

.filters.panel-filters {
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(11, 58, 91, 0.06);
}
.filters .filter-search { flex: 1.4; min-width: 200px; margin: 0; }
.filters .filter-papel { flex: 0.7; min-width: 150px; margin: 0; }
.filters .filter-search input,
.filters .filter-papel select {
  width: 100%; margin: 0; min-width: 0;
}
.btn-secondary {
  background: #e8f0f5; color: var(--navy); border: 0;
  box-shadow: none;
}
.btn-secondary:hover { background: #d9e7f0; }

.lista-cards,
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 360px));
  justify-content: start;
  gap: 1rem;
}
.person-card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--card); border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1rem;
  box-shadow: var(--shadow);
  min-width: 0; width: 100%;
  border: 1px solid rgba(11, 58, 91, 0.04);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.person-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--teal);
}
.person-card.is-pj::before { background: var(--navy); }
.person-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 138, 148, 0.18);
  box-shadow: 0 4px 10px rgba(11, 58, 91, 0.08), 0 16px 32px rgba(11, 58, 91, 0.12);
}
.person-card.is-inactive { opacity: 0.72; }
.person-card.is-inactive::before { background: #9aafbd; }
.person-card-hit {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit;
}
.person-card-head { display: flex; gap: 0.85rem; align-items: flex-start; }
.person-avatar {
  display: grid; place-items: center;
  width: 48px; height: 48px; flex: 0 0 auto;
  border-radius: 14px; background: #d9eef0; color: var(--teal);
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(20, 138, 148, 0.12);
}
.person-avatar.is-pj {
  background: linear-gradient(145deg, #e4eef5, #d5e4f0);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(11, 58, 91, 0.1);
}
.person-id { min-width: 0; }
.person-id h2 {
  margin: 0.08rem 0 0; font-size: 1.02rem; line-height: 1.3; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.person-code { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.person-fantasia {
  margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person-doc {
  margin: 0; font-weight: 700; color: var(--text); font-size: 0.95rem;
  letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
}
.person-meta {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem;
  color: var(--muted); font-size: 0.86rem;
}
.person-meta li {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #f3f7fa; border-radius: 999px; padding: 0.22rem 0.65rem;
}
.person-meta li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); flex: 0 0 auto;
}
.person-meta .meta-tel::before { background: var(--green); }
.person-foot {
  margin-top: auto; padding-top: 0.15rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.55rem;
  border-top: 1px solid #eef3f7; padding-top: 0.75rem;
}
.person-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.person-pills .pill-soft { margin: 0; }
.person-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.person-actions input, .person-actions select {
  width: auto; margin: 0; padding: 0.4rem 0.5rem; font-size: 0.85rem;
}
.btn-sm { width: auto; padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn-wa {
  background: #ecfdf3; color: #0f8a6a; border: 1px solid #b6e9c9;
  box-shadow: none;
}
.btn-wa:hover { background: #d9f7e6; color: #0b6e54; }
.catalog-price { margin: 0; font-size: 1.12rem; font-weight: 700; color: var(--navy); }
.form-tabs {
  display: flex; gap: 0.35rem; margin: 0 0 1rem; padding: 0.35rem;
  background: #e4eef5; border-radius: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  touch-action: pan-x;
}
.form-tabs.is-draggable { cursor: grab; }
.form-tabs.is-dragging,
.form-tabs.is-dragging a,
.form-tabs.is-dragging button { cursor: grabbing; user-select: none; }
.form-tabs::-webkit-scrollbar { height: 6px; }
.form-tabs::-webkit-scrollbar-thumb {
  background: #b7c9d6; border-radius: 99px;
}
.form-tabs button,
.form-tabs a {
  flex: 1 0 auto; text-align: center; border: 0;
  background: #fff; color: var(--navy);
  font-weight: 700; padding: 0.65rem 1rem; border-radius: 10px;
  cursor: pointer; box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.form-tabs button:hover,
.form-tabs a:hover {
  background: #d7e8ef; color: var(--teal);
}
.form-tabs button.is-active,
.form-tabs a.is-active {
  background: var(--navy); color: #fff; box-shadow: none;
}
.form-tabs button.is-active:hover,
.form-tabs a.is-active:hover {
  background: var(--navy-2); color: #fff;
}
.form-tabs button[data-tab="fiscal"].is-active,
.form-tabs button[data-tab="fiscal"].is-active:hover { background: var(--teal); }
.form-tabs button[data-tab="fotos"].is-active,
.form-tabs button[data-tab="fotos"].is-active:hover { background: var(--green-2); }
.wizard-steps {
  display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 1rem;
}
.wizard-steps button {
  border: 0; background: #eef4f8; color: var(--muted); font-weight: 700;
  padding: 0.5rem 0.7rem; border-radius: 999px; cursor: pointer; font-size: 0.82rem;
}
.wizard-steps button.is-active { background: var(--navy); color: #fff; }
.wizard-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.resumo-box, .itens-lista {
  background: #f4f8fb; border-radius: 10px; padding: 0.85rem 1rem; margin: 0.6rem 0;
}
.user-row {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  padding: 0.7rem 0; border-bottom: 1px solid #e6eef4; flex-wrap: wrap;
}
.user-row:last-child { border-bottom: 0; }
.pill-status {
  display: inline-block; border-radius: 999px; padding: 0.12rem 0.55rem;
  font-size: 0.75rem; font-weight: 700; text-transform: capitalize;
  background: #eef4f8; color: var(--navy);
}
.st-autorizada, .st-pago { background: #e8f8ef; color: var(--green-2); }
.st-rejeitada, .st-vencido, .st-cancelada { background: #fdecea; color: var(--danger); }
.st-rascunho, .st-aberto, .st-parcial { background: #fff6e5; color: #b7791f; }
.paginacao {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.65rem 1rem; margin: 1rem 0 0.25rem;
}
.paginacao-info { margin: 0; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.paginacao-nav {
  display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center;
}
.paginacao-nav a,
.paginacao-nav span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1rem; padding: 0.35rem 0.55rem; border-radius: 8px;
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
}
.paginacao-nav a { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.paginacao-nav a:hover { background: #eaf4f6; color: var(--teal); }
.paginacao-nav .is-on { background: var(--navy); color: #fff; }
.paginacao-nav .is-off { color: #9aafbd; background: #f4f8fb; }
.paginacao-por { margin: 0; }
.paginacao-por label { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.paginacao-por select { width: auto; margin: 0; padding: 0.3rem 0.5rem; font-size: 0.85rem; }
.event-card .person-meta { word-break: break-word; }
.event-card pre.wa-json { max-height: 12rem; overflow: auto; font-size: 0.75rem; background: #f4f8fb; padding: 0.5rem; border-radius: 8px; }
a.person-card, a.choice-card { color: inherit; }
a.person-card h2 { margin: 0 0 0.4rem; }
.field-split {
  display: flex; align-items: stretch; gap: 0.5rem; margin-top: 0.3rem;
}
.field-split > select,
.field-split > input {
  flex: 1; min-width: 0; margin-top: 0;
}
.field-split > .btn {
  margin: 0; width: auto; flex: 0 0 auto;
  padding: 0 1.1rem; min-width: 5.2rem;
  align-self: stretch; border-radius: 8px;
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  box-shadow: none;
}
.field-split > .btn:hover {
  background: var(--navy-2); border-color: var(--navy-2); color: #fff;
}
.label-row { display: flex; gap: 0.45rem; align-items: center; margin-top: 0.3rem; }
.label-row input { margin-top: 0; flex: 1; }
.help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 50%;
  background: #e4eef5; color: var(--navy); font-weight: 700; cursor: pointer;
}
.help-btn:hover { background: #d4e4ee; }
.ncm-results {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin: 0.35rem 0 0.7rem; max-height: 240px; overflow: auto;
  box-shadow: var(--shadow-sm);
}
.ncm-results button {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 0.65rem 0.85rem; cursor: pointer; font-size: 0.9rem;
  border-bottom: 1px solid #eef3f7;
}
.ncm-results button:hover { background: #f4f8fb; }
.foto-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.8rem; margin: 0.6rem 0 1rem;
}
.foto-grid:empty { display: none; margin: 0; }
.foto-item {
  display: flex; flex-direction: column; gap: 0.45rem;
  width: 160px; max-width: 100%;
  background: #fff; border-radius: 10px; padding: 0.55rem;
  box-shadow: var(--shadow-sm);
}
.foto-item img {
  width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: #eef4f8;
}
.foto-item .foto-meta { margin: 0; font-size: 0.78rem; }
.foto-crop-wrap {
  max-height: 58vh; background: #111827; border-radius: 10px; overflow: hidden;
}
.foto-crop-wrap img { display: block; max-width: 100%; }
.swal2-popup.foto-crop-swal { padding: 1.1rem 1.1rem 1.2rem; }
.swal2-popup.foto-crop-swal .swal2-html-container {
  margin: 0.4rem 0 0.8rem; overflow: hidden;
}
.swal2-popup.foto-crop-swal .cropper-view-box,
.swal2-popup.foto-crop-swal .cropper-face { border-radius: 8px; }
.foto-drop {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 132px; margin: 0.5rem 0 0.8rem; padding: 1.1rem 1rem;
  border: 1.5px dashed var(--line); border-radius: 12px; background: #fff;
  text-align: center; cursor: pointer;
}
.foto-drop.is-over { border-color: var(--teal); background: #eef8fa; }
.foto-drop.is-full { opacity: 0.55; pointer-events: none; cursor: default; }
.foto-drop-input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; box-shadow: none; pointer-events: none; font-size: 0;
}
.foto-drop-msg { display: flex; flex-direction: column; gap: 0.2rem; pointer-events: none; }
.foto-drop-msg strong { color: var(--navy); }
textarea { resize: vertical; min-height: 4.2rem; }

.nav-overlay { display: none; }
.menu-close { display: none; }
.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 10px 9px; margin-right: 0.45rem;
  border: 0; border-radius: 10px; background: #f4f8fb; cursor: pointer; flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}
.menu-toggle span {
  display: block; height: 2px; background: var(--navy); border-radius: 2px;
}
.menu-toggle:hover { background: #e7eef4; }
html.sidebar-collapsed .menu-toggle { background: #e0ebf2; }
.sidebar-collapse { display: none; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sidebar-plan { color: #9bb4c6; font-size: 0.85rem; text-transform: capitalize; }
.topbar-company { min-width: 0; flex: 1; }
.topbar-company strong, .topbar-company .muted {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (min-width: 961px) {
  html.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
    flex-basis: var(--sidebar-collapsed);
    padding: 1.1rem 0.55rem;
  }
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .sidebar-plan { display: none; }
  html.sidebar-collapsed .brand { justify-content: center; }
  html.sidebar-collapsed .sidebar nav a,
  html.sidebar-collapsed .sidebar-collapse {
    justify-content: center; padding: 0.7rem 0.45rem; gap: 0;
  }
  html.sidebar-collapsed .sidebar-collapse .nav-icon { transform: rotate(180deg); }
  html.sidebar-collapsed .pill {
    width: 10px; height: 10px; padding: 0; overflow: hidden; color: transparent;
    display: block; margin: 0 auto; border-radius: 50%;
  }
  html.sidebar-collapsed .sidebar-foot { align-items: center; }
}

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
}

@media (min-width: 721px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .menu-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 0; border-radius: 8px;
    background: rgba(255,255,255,0.12); color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1;
  }
  .nav-overlay {
    display: none; position: fixed; inset: 0; background: rgba(11, 58, 91, 0.45);
    z-index: 30;
  }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(80vw, 280px);
    flex-basis: auto; transform: translateX(-105%); transition: transform 0.22s ease;
    z-index: 40; padding: 1.2rem 1rem;
  }
  html.sidebar-collapsed .sidebar {
    width: min(80vw, 280px); flex-basis: auto; padding: 1.2rem 1rem;
  }
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .sidebar-plan { display: inline; }
  html.sidebar-collapsed .brand,
  html.sidebar-collapsed .sidebar nav a,
  html.sidebar-collapsed .sidebar-collapse { justify-content: flex-start; }
  html.sidebar-collapsed .sidebar-collapse .nav-icon { transform: none; }
  html.sidebar-collapsed .pill {
    width: auto; height: auto; padding: 0.15rem 0.6rem; color: #9fe7c3;
    display: inline-block; margin: 0; overflow: visible;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-overlay { display: block; }
  .topbar { padding: 0.75rem 0.9rem; gap: 0.5rem; }
  .content { padding: 1rem 0.9rem 1.6rem; }
  .panel { padding: 1rem 0.95rem 1.15rem; }
  .switch.switch-block { margin-top: 0.4rem; }
}

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn, .page-head .btn-inline { width: 100%; }
  .filters, .panel-filters { flex-direction: column; align-items: stretch; }
  .filters .filter-search, .filters .filter-papel { min-width: 0; width: 100%; flex: none; }
  .filters input, .filters select, .filters .btn {
    width: 100%; min-width: 0; flex: none;
  }
  .lista-cards, .person-grid {
    grid-template-columns: 1fr;
  }
  .plan-meter { max-width: none; }
  .person-foot { flex-direction: column; align-items: stretch; }
  .person-actions { width: 100%; }
  .field-split { flex-direction: column; }
  .field-split > .btn { width: 100%; min-height: 2.85rem; }
  .btn-primary.btn-inline, .btn-secondary.btn-inline { width: 100%; }
  .person-actions .btn { flex: 1; }
  .switches-row { flex-direction: column; gap: 0.65rem; }
  .auth-wrap { width: calc(100% - 1.2rem); padding: 1rem 0 1.5rem; }
  .auth-card { padding: 1.2rem 1.1rem 1.4rem; }
  .auth-brand { font-size: 1.22rem; }
  .auth-brand img { width: 36px; height: 36px; }
  .auth-card h1 { font-size: 1.25rem; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: 0.85rem 1rem; border-bottom: 1px solid #e6eef4; }
  table.data td {
    padding: 0.2rem 0; border: 0; display: grid;
    grid-template-columns: 7.5rem 1fr; gap: 0.4rem; align-items: start;
  }
  table.data td::before {
    content: attr(data-label); color: var(--muted); font-size: 0.75rem; font-weight: 600;
  }
  table.data td:last-child { margin-top: 0.35rem; }
  table.data td:last-child::before { content: none; }
}

@media (max-width: 480px) {
  .topbar-user span { display: none; }
  .topbar-company .muted { font-size: 0.78rem; }
  html { font-size: 16px; }
}
