:root {
  --bg: #f5f8ff;
  --bg-soft: #eef4ff;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .10);

  --brand: #0a4dff;
  --brand-2: #00b8ff;
  --brand-dark: #0736b8;

  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(10, 77, 255, .14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 44%, #eef4ff 100%);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: block;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(10, 77, 255, .14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f8ff 48%, #eef4ff 100%);
}

.login-wrap {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-logo,
.floating-logo {
  position: static;
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
}

.login-logo img,
.floating-logo img {
  width: 142px;
  height: auto;
  display: block;
  object-fit: contain;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -.04em;
}

.login-card p {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 14px;
  padding: 14px;
  font-size: 16px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(10, 77, 255, .55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(10, 77, 255, .12);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(10, 77, 255, .22);
}

.btn:active {
  transform: translateY(0);
}

.alert {
  background: rgba(239, 68, 68, .10);
  border: 1px solid rgba(239, 68, 68, .28);
  color: #991b1b;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.alert.success {
  color: #166534;
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .28);
}

.auth-link {
  margin: 28px 0 0;
  padding-top: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.auth-link a {
  color: var(--brand);
  font-weight: 800;
}

.auth-link a:hover {
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .94));
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  overflow-y: auto;
  box-shadow: 10px 0 34px rgba(15, 23, 42, .04);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.brand-logo {
  width: 132px;
  height: auto;
  display: block;
  object-fit: contain;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 14px;
  color: #475569;
  font-weight: 700;
  font-size: 15px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar a:hover {
  background: #eef5ff;
  color: var(--brand);
}

.sidebar a.active {
  background: linear-gradient(135deg, rgba(10, 77, 255, .12), rgba(0, 184, 255, .12));
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(10, 77, 255, .12);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.topbar strong {
  display: block;
  font-size: 20px;
  letter-spacing: -.02em;
}

.topbar span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  min-width: 0;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.card small {
  color: var(--muted);
  font-weight: 700;
}

.card strong {
  display: block;
  font-size: clamp(24px, 2.7vw, 30px);
  margin-top: 8px;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  background:
    radial-gradient(circle at top right, rgba(0, 184, 255, .22), transparent 38%),
    linear-gradient(135deg, #0636c8 0%, #0a4dff 52%, #00a9ff 100%);
  color: #ffffff;
  border: 0;
  border-radius: 28px;
  padding: 30px;
  margin-bottom: 18px;
  box-shadow: 0 24px 70px rgba(10, 77, 255, .24);
  overflow: hidden;
}

.hero-card small,
.hero-card .muted {
  color: rgba(255, 255, 255, .72);
}

.muted {
  color: var(--muted);
}

.hero-card h1 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}

.hero-card p {
  color: rgba(255, 255, 255, .78);
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
}

.hero-value {
  min-width: 230px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  padding: 22px;
  display: grid;
  align-content: center;
  backdrop-filter: blur(12px);
}

.hero-value strong {
  font-size: clamp(25px, 3vw, 32px);
  margin-top: 8px;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stat-card strong {
  font-size: clamp(22px, 2.5vw, 26px);
  word-break: break-word;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.03em;
}

.section-title a {
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.section-title a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(10, 77, 255, .16);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(10, 77, 255, .08);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table small {
  color: var(--muted);
}

.table tr:hover td {
  background: rgba(10, 77, 255, .035);
}

.qr-code,
.qr-box {
  width: 100%;
  max-width: 280px;
}

.qr-code img,
.qr-box img {
  width: 100%;
  height: auto;
  display: block;
}

/* Correcoes defensivas para telas de perfil e cards especificos */
.profile-card,
.profile-panel,
.profile-box,
.profile-info,
.profile-details,
.profile-grid,
.public-profile,
.wallet-card,
.qr-card {
  min-width: 0;
}

.profile-grid,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-hero,
.profile-header {
  min-width: 0;
  overflow: hidden;
}

.profile-hero h1,
.profile-header h1,
.profile-card h1,
.profile-card h2,
.card h1,
.card h2,
.card h3 {
  overflow-wrap: anywhere;
}

.profile-avatar,
.avatar {
  max-width: 96px;
  max-height: 96px;
  border-radius: 24px;
  object-fit: cover;
}

.profile-actions,
.card-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.profile-actions .btn,
.card-actions .btn,
.actions .btn {
  width: auto;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 12px;
  }

  .sidebar a {
    font-size: 14px;
    padding: 10px 12px;
  }

  .brand-logo {
    width: 120px;
  }

  .hero-card {
    padding: 26px;
  }
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid,
  .profile-layout {
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    overflow: visible;
  }

  .brand {
    margin-bottom: 14px;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card {
    flex-direction: column;
  }

  .hero-value {
    min-width: 0;
  }

  .profile-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .qr-code,
  .qr-box {
    max-width: 240px;
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  .login-page {
    padding: 16px;
  }

  .login-wrap {
    min-height: calc(100vh - 32px);
  }

  .login-card {
    padding: 24px;
    border-radius: 24px;
  }

  .login-logo img,
  .floating-logo img {
    width: 124px;
  }

  .login-card h1 {
    font-size: 27px;
  }

  .main {
    padding: 16px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px;
    border-radius: 24px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-actions .btn,
  .card-actions .btn,
  .actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 14px;
  }

  .sidebar {
    padding: 14px;
  }

  .brand {
    justify-content: center;
  }

  .brand-logo {
    width: 118px;
  }

  .topbar,
  .card {
    border-radius: 18px;
  }

  .topbar {
    padding: 16px;
  }

  .hero-card {
    border-radius: 22px;
    padding: 20px;
  }

  .user-pill {
    width: 100%;
    justify-content: center;
  }

  .qr-code,
  .qr-box {
    max-width: 190px;
  }
}

/* =========================
   PROFILE PAGE V2
========================= */

.profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) 260px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;

  background:
    radial-gradient(circle at top right, rgba(0,184,255,.22), transparent 38%),
    linear-gradient(135deg,#0636c8 0%,#0a4dff 54%,#00a9ff 100%);

  border-radius: 28px;
  padding: 28px;
  color: #fff;

  box-shadow:
    0 24px 70px rgba(10,77,255,.24);
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-avatar-card {
  width: 96px;
  height: 96px;
  flex-shrink: 0;

  border-radius: 28px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}

.profile-avatar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-card strong {
  color: #fff;
  font-size: 34px;
}

.profile-hero-content {
  min-width: 0;
}

.profile-hero-content small {
  color: rgba(255,255,255,.75);
  font-weight: 700;
}

.profile-hero-content h1 {
  margin: 6px 0;
  font-size: clamp(30px,4vw,48px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.profile-hero-content p {
  margin: 0;
  color: rgba(255,255,255,.80);
}

.profile-type-card {
  display: flex;
  flex-direction: column;
  justify-content: center;

  border-radius: 22px;
  padding: 22px;

  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}

.profile-type-card small {
  color: rgba(255,255,255,.72);
}

.profile-type-card strong {
  color: #fff;
  margin-top: 6px;
  font-size: 28px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 20px;
  align-items: start;
}

.profile-content {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.profile-qr-card {
  position: sticky;
  top: 24px;
}

.profile-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.profile-qr-wrap img {
  width: min(260px,100%);
  height: auto;

  background: #fff;
  border-radius: 20px;
  padding: 12px;

  box-shadow:
    0 10px 30px rgba(15,23,42,.08);
}

.profile-link-field {
  margin-top: 18px;
}

.profile-info-list {
  display: grid;
  gap: 10px;
}

.profile-info-list p {
  margin: 0;

  display: grid;
  grid-template-columns: 140px minmax(0,1fr);

  gap: 12px;

  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.profile-info-list p:last-child {
  border-bottom: 0;
}

.profile-info-list strong {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.profile-info-list span {
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-actions form {
  margin: 0;
}

.profile-actions .btn {
  width: auto;
}

.profile-nested-card {
  margin-top: 18px;

  border-radius: 18px;
  padding: 18px;

  background: rgba(10,77,255,.04);
  border: 1px solid rgba(10,77,255,.08);
}

.notice {
  padding: 14px;
  border-radius: 14px;
}

.notice-success {
  color: #166534;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.28);
}

.empty-state {
  text-align: center;
  padding: 24px;

  border-radius: 18px;

  background: rgba(10,77,255,.04);
  border: 1px dashed rgba(10,77,255,.15);

  color: var(--muted);
}

@media (max-width: 1100px) {

  .profile-layout {
    grid-template-columns: 280px minmax(0,1fr);
  }

}

@media (max-width: 920px) {

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-qr-card {
    position: static;
  }

}

@media (max-width: 760px) {

  .profile-hero-card {
    grid-template-columns: 1fr;
  }

  .profile-hero-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-info-list p {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .profile-actions,
  .profile-actions form,
  .profile-actions .btn {
    width: 100%;
  }

}

/* =========================
   MOBILE / TABLET REFINEMENT
========================= */

@media (max-width: 920px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(10, 77, 255, .10), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, #f5f8ff 52%, #eef4ff 100%);
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 14px;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar nav a,
  .sidebar nav a span {
    white-space: nowrap;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
    padding: 10px 13px;
    font-size: 14px;
  }

  .brand {
    justify-content: center;
    margin-bottom: 12px;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
  }

  .topbar strong {
    font-size: 18px;
  }

  .user-pill {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .profile-hero-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
    border-radius: 24px;
    margin-bottom: 16px;
  }

  .profile-hero-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar-card {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
    border-radius: 24px;
  }

  .profile-hero-content h1 {
    font-size: clamp(26px, 8vw, 36px);
    letter-spacing: -.04em;
  }

  .profile-hero-content p {
    font-size: 15px;
  }

  .profile-type-card {
    align-items: center;
    text-align: center;
    padding: 18px;
  }

  .profile-type-card strong {
    font-size: 24px;
  }

  .profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-qr-card {
    position: static;
    order: 1;
  }

  .profile-content {
    order: 2;
    gap: 16px;
  }

  .profile-qr-wrap img {
    width: min(220px, 100%);
  }

  .card {
    padding: 18px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-title h2 {
    font-size: 19px;
  }

  .profile-section-title .btn,
  .btn-inline {
    width: 100%;
  }

  .profile-info-list p {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px 0;
  }

  .profile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-actions form,
  .profile-actions .btn,
  .profile-actions a {
    width: 100%;
  }

  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 14px;
  }

  .table th,
  .table td {
    padding: 12px 10px;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .brand-logo {
    width: 112px;
  }

  .sidebar nav a {
    font-size: 13px;
    padding: 9px 12px;
  }

  .topbar {
    border-radius: 18px;
  }

  .profile-hero-card {
    padding: 18px;
    border-radius: 22px;
  }

  .profile-avatar-card {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
    border-radius: 22px;
  }

  .profile-hero-content h1 {
    font-size: 28px;
  }

  .profile-hero-content p {
    font-size: 14px;
  }

  .profile-type-card {
    padding: 16px;
    border-radius: 18px;
  }

  .profile-type-card strong {
    font-size: 22px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .profile-qr-wrap img {
    width: min(190px, 100%);
    padding: 10px;
    border-radius: 18px;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 15px;
    padding: 13px;
  }

  .btn {
    min-height: 46px;
    padding: 13px 16px;
  }

  .profile-nested-card {
    padding: 16px;
    border-radius: 18px;
  }

    .empty-state {
    padding: 18px;
  }
}

/* =========================
   PADRONIZAÇÃO DE BOTÕES
========================= */

.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active,
.btn:focus,
.btn-inline,
.btn-inline:link,
.btn-inline:visited,
.btn-inline:hover,
.btn-inline:active,
.btn-inline:focus,
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active,
a.btn:focus,
a.btn-inline,
a.btn-inline:link,
a.btn-inline:visited,
a.btn-inline:hover,
a.btn-inline:active,
a.btn-inline:focus,
.section-title a.btn,
.section-title a.btn:hover,
.section-title a.btn-inline,
.section-title a.btn-inline:hover,
button.btn,
button.btn:hover,
input.btn {
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn *,
.btn-inline *,
a.btn *,
a.btn-inline * {
  color: #ffffff !important;
}

.btn svg,
.btn-inline svg,
a.btn svg,
a.btn-inline svg {
  fill: currentColor;
}
/* =========================
   MENU LATERAL OCULTO / OFF-CANVAS
========================= */

.app-shell {
  display: block;
}

.main {
  width: 100%;
  min-height: 100vh;
  padding-left: 24px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: min(300px, 88vw);
  height: 100vh;
  transform: translateX(-105%);
  transition: transform .22s ease;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

body.sidebar-open .sidebar-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.sidebar-open {
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sidebar-header .brand {
  margin-bottom: 0;
  padding: 0;
}

.sidebar-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(10, 77, 255, .08);
  color: var(--brand);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(10, 77, 255, .18);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: #ffffff;
}

.topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.topbar-title {
  min-width: 0;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 8px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 920px) {
  .main {
    padding: 14px;
  }

  .sidebar {
    position: fixed;
    height: 100vh;
    padding: 20px 16px;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    padding-bottom: 24px;
  }

  .sidebar nav a {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    white-space: normal;
  }

  .brand {
    justify-content: flex-start;
  }

  .topbar {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .user-pill {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 12px;
  }

  .topbar {
    padding: 14px;
    gap: 12px;
  }

  .sidebar {
    width: min(286px, 88vw);
  }

  .sidebar-close,
  .menu-toggle {
    width: 42px;
    height: 42px;
  }
  /* =========================
   COLOR CODE POR PERFIL
========================= */

:root {
  --role-color: var(--brand);
  --role-color-2: var(--brand-2);
  --role-rgb: 10, 77, 255;
  --role-text: #ffffff;
}

/* Use uma dessas classes no body:
   role-system-master
   role-manager
   role-exhibitor
   role-buyer
*/

body.role-system-master {
  --role-color: #0f2f75;
  --role-color-2: #0a4dff;
  --role-rgb: 15, 47, 117;
  --role-text: #ffffff;
}

body.role-manager {
  --role-color: #6d28d9;
  --role-color-2: #a855f7;
  --role-rgb: 109, 40, 217;
  --role-text: #ffffff;
}

body.role-exhibitor {
  --role-color: #15803d;
  --role-color-2: #22c55e;
  --role-rgb: 21, 128, 61;
  --role-text: #ffffff;
}

body.role-buyer {
  --role-color: #f59e0b;
  --role-color-2: #f97316;
  --role-rgb: 245, 158, 11;
  --role-text: #111827;
}

/* Badge padrão passa a usar a cor do perfil */
.badge,
.role-badge {
  border-color: rgba(var(--role-rgb), .20);
  background: rgba(var(--role-rgb), .10);
  color: var(--role-color);
}

/* Pílula do usuário */
.user-pill {
  border-color: rgba(var(--role-rgb), .18);
  background: rgba(var(--role-rgb), .07);
}

/* Cards com sinalização sutil */
.card {
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, var(--role-color), var(--role-color-2));
  opacity: .85;
}

/* Hero do perfil muda conforme o tipo */
.profile-hero-card {
  background:
    radial-gradient(circle at top right, rgba(var(--role-rgb), .34), transparent 38%),
    linear-gradient(135deg, var(--role-color) 0%, var(--role-color-2) 100%);
  box-shadow: 0 24px 70px rgba(var(--role-rgb), .26);
}

/* Card do tipo de perfil */
.profile-type-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.24);
}

.profile-type-card strong {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.12;
}

/* Avatar ganha identidade do perfil */
.profile-avatar-card {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.24);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.10);
}

/* Botões principais também podem herdar a cor do perfil */
.btn {
  background: linear-gradient(135deg, var(--role-color), var(--role-color-2));
}

.btn:hover {
  box-shadow: 0 14px 34px rgba(var(--role-rgb), .22);
}

/* Menu ativo acompanha o perfil */
.sidebar a.active {
  background: rgba(var(--role-rgb), .10);
  color: var(--role-color);
  box-shadow: inset 0 0 0 1px rgba(var(--role-rgb), .14);
}

.sidebar a:hover {
  background: rgba(var(--role-rgb), .08);
  color: var(--role-color);
}

/* Card interno do perfil */
.profile-nested-card,
.empty-state {
  background: rgba(var(--role-rgb), .045);
  border-color: rgba(var(--role-rgb), .12);
}

@media (min-width: 921px) {
  .profile-type-card strong {
    font-size: clamp(24px, 2vw, 30px);
  }
}
 /* =========================
   COLOR CODE POR PERFIL - QR PAY V2
   Cole no FINAL do CSS principal.
   Esta versão usa um container único: .profile-page.role-...
========================= */

.profile-page {
  --profile-role-color: #0a4dff;
  --profile-role-color-2: #00b8ff;
  --profile-role-rgb: 10, 77, 255;
}

.profile-page.role-system-master {
  --profile-role-color: #0f2f75;
  --profile-role-color-2: #0a4dff;
  --profile-role-rgb: 15, 47, 117;
}

.profile-page.role-manager {
  --profile-role-color: #6d28d9;
  --profile-role-color-2: #a855f7;
  --profile-role-rgb: 109, 40, 217;
}

.profile-page.role-exhibitor {
  --profile-role-color: #15803d;
  --profile-role-color-2: #22c55e;
  --profile-role-rgb: 21, 128, 61;
}

.profile-page.role-buyer {
  --profile-role-color: #f59e0b;
  --profile-role-color-2: #fb923c;
  --profile-role-rgb: 245, 158, 11;
}

.profile-page .profile-hero-card {
  background:
    radial-gradient(circle at top right, rgba(var(--profile-role-rgb), .36), transparent 38%),
    linear-gradient(135deg, var(--profile-role-color) 0%, var(--profile-role-color-2) 100%) !important;
  box-shadow: 0 24px 70px rgba(var(--profile-role-rgb), .26) !important;
}

.profile-page .profile-avatar-card {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .30) !important;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, .12),
    0 10px 28px rgba(var(--profile-role-rgb), .24) !important;
}

.profile-page .profile-type-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .16) !important;
  border-color: rgba(255, 255, 255, .28) !important;
}

.profile-page .profile-type-card strong {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.12;
  color: #ffffff !important;
}

.profile-page .profile-type-card small {
  color: rgba(255, 255, 255, .78) !important;
}

.profile-page .profile-layout > .card,
.profile-page .profile-content > .card {
  position: relative;
  overflow: hidden;
}

.profile-page .profile-layout > .card::before,
.profile-page .profile-content > .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--profile-role-color), var(--profile-role-color-2));
  opacity: .9;
}

.profile-page .badge {
  border-color: rgba(var(--profile-role-rgb), .22) !important;
  background: rgba(var(--profile-role-rgb), .10) !important;
  color: var(--profile-role-color) !important;
}

.profile-page .profile-nested-card,
.profile-page .empty-state {
  background: rgba(var(--profile-role-rgb), .045) !important;
  border-color: rgba(var(--profile-role-rgb), .14) !important;
}

@media (min-width: 921px) {
  .profile-page .profile-type-card strong {
    font-size: clamp(24px, 2vw, 30px);
  }
}

}