:root {
  --bg: #f4f7fb;
  --bg-2: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --ink: #111827;
  --muted: #667085;
  --muted-2: #8a94a6;
  --line: #dce3ee;
  --brand: #041a57;
  --brand-2: #082b88;
  --brand-soft: #eaf0ff;
  --red: #ed1c2e;
  --red-2: #c8102e;
  --red-soft: #fff0f2;
  --amber: #b7791f;
  --amber-soft: #fff7e6;
  --green: #14804a;
  --green-soft: #e9f8f0;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --black: #0b1020;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 22px rgba(9, 30, 66, 0.08);
  --shadow: 0 18px 55px rgba(9, 30, 66, 0.12);
  --shadow-lg: 0 26px 70px rgba(4, 26, 87, 0.18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(237, 28, 46, 0.12), transparent 34vw),
    radial-gradient(circle at 92% 5%, rgba(4, 26, 87, 0.18), transparent 32vw),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 44%, #edf2f9 100%);
  color: var(--ink);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(4, 26, 87, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 26, 87, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 65%);
  z-index: -1;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 14px clamp(16px, 3vw, 38px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 227, 238, .92);
  box-shadow: 0 12px 34px rgba(9, 30, 66, 0.08);
  backdrop-filter: blur(18px);
}

.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--red), var(--brand));
}

.auth-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

body.public-session #internal-auth-box { display: none; }

.internal-access {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

body:not(.public-session) .internal-access { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 250px;
}

.brand-logo {
  width: 138px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
  padding: 4px 0;
  filter: drop-shadow(0 5px 10px rgba(4, 26, 87, .08));
}

.brand strong, .brand span { display: block; }
.brand strong { color: var(--brand); font-size: 1rem; letter-spacing: -.02em; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 0.82rem; }

.top-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  background: rgba(238, 243, 250, 0.92);
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.nav-button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nav-button:hover { color: var(--brand); background: rgba(255,255,255,.75); }
.nav-button.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(4, 26, 87, 0.18);
}

main {
  width: min(1240px, calc(100% - 30px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.view { display: none; }
.view.is-active { display: block; animation: fadeUp .28s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.intro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(26px, 4.5vw, 52px);
  border: 1px solid rgba(220, 227, 238, .9);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 96% 8%, rgba(237, 28, 46, 0.17), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f6f9ff 54%, #ecf2ff 100%);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.intro-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 60%, rgba(4, 26, 87, .055) 60% 61%, transparent 61% 100%),
    linear-gradient(130deg, transparent 0 71%, rgba(237, 28, 46, .08) 71% 72%, transparent 72% 100%);
  pointer-events: none;
}

.intro-hero::after {
  content: "RMA";
  position: absolute;
  right: -18px;
  bottom: -46px;
  color: rgba(4, 26, 87, .045);
  font-size: clamp(7rem, 17vw, 14rem);
  font-weight: 1000;
  letter-spacing: -.08em;
  line-height: .8;
  pointer-events: none;
}

.intro-hero > * { position: relative; z-index: 1; }

.intro-copy {
  max-width: 790px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.intro-panel {
  padding: 22px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(9, 30, 66, 0.08);
  backdrop-filter: blur(10px);
}

.steps-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.steps-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--red));
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 10px 18px rgba(237, 28, 46, .14);
}

.info-grid, .profile-grid, .admin-grid, .detail-grid {
  display: grid;
  gap: 16px;
}
.info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-grid, .admin-grid, .detail-grid { grid-template-columns: 1fr 1fr; }
.profile-card { max-width: 720px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--red-2);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--red);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.55rem); line-height: .98; letter-spacing: -.045em; color: var(--brand); }
h2 { margin-bottom: 6px; font-size: 1.22rem; letter-spacing: -.02em; }
h3 { letter-spacing: -.015em; }
p { line-height: 1.55; }

.status-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.status-strip span {
  padding: 9px 12px;
  border: 1px solid rgba(220, 227, 238, .9);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.status-strip span::before { content: "✓ "; color: var(--red); }

.form-shell, .lookup-band, .toolbar, .table-wrap, .result-card, dialog {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-shell { overflow: hidden; }
.form-section {
  display: grid;
  grid-template-columns: minmax(210px, 295px) 1fr;
  gap: 26px;
  padding: 26px;
  border-bottom: 1px solid rgba(220, 227, 238, .78);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.98));
}
.form-section:last-of-type { border-bottom: 0; }
.section-title p { color: var(--muted); line-height: 1.48; margin-bottom: 0; }
.section-title h2 { color: var(--brand); }

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

label {
  display: grid;
  gap: 8px;
  color: #4c5668;
  font-size: 0.82rem;
  font-weight: 900;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { resize: vertical; min-height: 108px; }
input::placeholder, textarea::placeholder { color: #9aa4b2; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 43, 136, 0.12);
}

input[type="file"] { padding: 9px; background: #fff; }
input[type="checkbox"] { accent-color: var(--red); }
.span-2 { grid-column: 1 / -1; }

.items-list { display: grid; gap: 14px; }
.item-row {
  padding: 17px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 26px rgba(9, 30, 66, 0.06);
}
.item-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.item-row-head strong { color: var(--brand); }

.terms {
  display: flex;
  grid-column: 2;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(237, 28, 46, .16);
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 750;
}
.terms input { width: 18px; min-height: 18px; margin-top: 2px; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 26px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.primary-button, .secondary-button, .small-button, .remove-item, .icon-button, .link-button {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 950;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.primary-button {
  border: 1px solid var(--red-2);
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: white;
  padding: 0 19px;
  box-shadow: 0 12px 24px rgba(237, 28, 46, 0.22);
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(237, 28, 46, 0.28); }
.secondary-button, .small-button {
  border: 1px solid #d9e1ec;
  background: #fff;
  color: var(--brand);
  padding: 0 15px;
  box-shadow: 0 8px 18px rgba(9, 30, 66, 0.06);
}
.secondary-button:hover, .small-button:hover, .icon-button:hover { transform: translateY(-1px); border-color: var(--brand-2); }
.link-button { min-height: 34px; padding: 0; border: 0; background: transparent; color: var(--red-2); }
.remove-item {
  min-height: 36px;
  border: 1px solid rgba(237, 28, 46, .24);
  background: var(--red-soft);
  color: var(--red-2);
  padding: 0 12px;
}

.lookup-band, .toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  margin-bottom: 18px;
}
.toolbar { grid-template-columns: 1fr 220px 180px; }
.result-area { display: grid; gap: 16px; }
.result-card { padding: 22px; }

.summary-line { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 950;
  border: 1px solid rgba(220, 227, 238, .9);
}
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: #f3d38f; }
.pill.red { background: var(--red-soft); color: var(--red-2); border-color: rgba(237, 28, 46, .18); }
.pill.blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(37, 99, 235, .16); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--red);
}
.metric span { color: var(--muted); font-weight: 850; }
.metric strong { display: block; margin-top: 10px; font-size: 2.1rem; color: var(--brand); letter-spacing: -.04em; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 820px; }
th, td { padding: 15px; border-bottom: 1px solid rgba(220, 227, 238, .8); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 0.74rem; letter-spacing: .06em; text-transform: uppercase; background: #f8fbff; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f8fbff; }
.row-actions { text-align: right; }

.table-wrap table th:first-child { border-top-left-radius: var(--radius); }
.table-wrap table th:last-child { border-top-right-radius: var(--radius); }

dialog {
  width: min(980px, calc(100% - 24px));
  max-height: 88vh;
  overflow: auto;
  padding: 0;
}
dialog::backdrop { background: rgba(11, 16, 32, 0.58); backdrop-filter: blur(3px); }
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(220, 227, 238, .85);
  background: linear-gradient(135deg, #fff, #f7faff);
}
.dialog-head h2 { margin: 0; color: var(--brand); }
.icon-button { width: 42px; border: 1px solid #d9e1ec; background: var(--surface); color: var(--brand); font-size: 1.4rem; }
#dialog-body { padding: 22px; }

.detail-panel {
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}
.detail-panel h2, .detail-panel h3 { color: var(--brand); }
.detail-panel.full { grid-column: 1 / -1; }
.detail-panel p:last-child { margin-bottom: 0; }
.detail-list, .timeline { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.timeline li {
  position: relative;
  padding: 2px 0 12px 18px;
  border-left: 3px solid rgba(237, 28, 46, .25);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.terms-card {
  padding: 18px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fff8f9);
  box-shadow: var(--shadow-sm);
}
.terms-card h3 { margin: 0 0 10px; color: var(--brand); }
.terms-scroll { max-height: 360px; overflow: auto; padding-right: 12px; color: var(--ink); line-height: 1.58; }
.terms-scroll p { margin-bottom: 12px; }

.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.page-actions.left { justify-content: flex-start; }
.login-required {
  background:
    linear-gradient(135deg, rgba(255,240,242,.96), rgba(255,255,255,.95));
  border-left: 5px solid var(--red);
}
body.client-locked #rma-form > .form-section:not(.login-required),
body.client-locked #rma-form > .form-actions { display: none; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 14px; }
.inline-actions label { min-width: 190px; flex: 1; }
.login-panel { margin: 0; }
.login-body { display: grid; gap: 16px; padding: 20px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.storage-warning {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #f3d38f;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: #7b520d;
  font-weight: 850;
}
.empty-state { padding: 32px; color: var(--muted); text-align: center; }
.app-footer { padding: 24px 16px 38px; border-top: 1px solid rgba(220, 227, 238, .85); color: var(--muted); text-align: center; font-size: 0.86rem; font-weight: 800; }

/* Barra de rolagem mais discreta */
* { scrollbar-width: thin; scrollbar-color: #b9c3d3 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #b9c3d3; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }

@media (max-width: 1040px) {
  .app-header { grid-template-columns: 1fr; gap: 12px; }
  .brand { min-width: 0; }
  .top-nav { justify-content: flex-start; overflow-x: auto; width: 100%; }
  .auth-box { justify-content: flex-start; }
}

@media (max-width: 820px) {
  main { width: min(100% - 22px, 1240px); padding-top: 24px; }
  .page-head, .form-section { display: block; }
  .status-strip { margin-top: 14px; }
  .form-section { padding: 20px; }
  .section-title { margin-bottom: 16px; }
  .field-grid, .lookup-band, .toolbar, .metrics, .detail-grid, .admin-grid, .intro-hero, .info-grid, .profile-grid { grid-template-columns: 1fr; }
  .terms { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions button, .lookup-band button { width: 100%; }
  .intro-hero { padding: 24px; border-radius: 20px; }
  h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
}

@media (max-width: 520px) {
  .brand-logo { width: 118px; }
  .brand { align-items: flex-start; }
  .brand strong { font-size: .95rem; }
  .brand span { font-size: .78rem; }
  .nav-button { padding: 0 12px; }
  .intro-copy { font-size: 1rem; }
  .form-section, .result-card, .detail-panel, .lookup-band, .toolbar { padding: 16px; }
}

/* Ajuste de segurança visual: o acesso interno não aparece mais no Perfil do cliente. */
.profile-grid.single-profile {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.restricted-note {
  padding: 12px 14px;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.45;
}

.internal-access {
  opacity: .46;
  transform: scale(.96);
}
.internal-access:hover,
.internal-access:focus-visible {
  opacity: 1;
  transform: scale(1);
}

/* Ajustes premium: termo/anexos mais organizado */
.rma-support-section { align-items: start; }
.rma-support-content { display: grid; gap: 18px; min-width: 0; }
.terms-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.terms-card-head p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(8, 43, 136, .16);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.support-grid small {
  color: var(--muted-2);
  font-weight: 750;
  line-height: 1.35;
}
.compact-terms {
  grid-column: auto;
  margin-top: 0;
  align-items: center;
  border-color: rgba(20, 128, 74, .22);
  background: linear-gradient(135deg, var(--green-soft), #fff);
}
.compact-terms span { line-height: 1.42; }

/* Perfil em estilo rede social */
.profile-social {
  display: grid;
  gap: 18px;
}
.profile-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-lg);
}
.profile-cover {
  min-height: 128px;
  background:
    radial-gradient(circle at 92% 10%, rgba(237, 28, 46, .28), transparent 30%),
    linear-gradient(135deg, var(--brand), var(--brand-2) 56%, #0b4ac0);
}
.profile-main {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 22px;
}
.profile-identity {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  margin-top: -38px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 5px solid #fff;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--red), var(--brand));
  color: #fff;
  font-size: 2rem;
  font-weight: 1000;
  box-shadow: 0 16px 32px rgba(4, 26, 87, .18);
}
.profile-title h2 { margin: 0 0 5px; color: var(--brand); font-size: clamp(1.4rem, 3vw, 2.1rem); }
.profile-title p { margin: 0; color: var(--muted); font-weight: 800; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 22px;
}
.profile-info-item {
  padding: 14px;
  border: 1px solid rgba(220, 227, 238, .9);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.profile-info-item span { display: block; color: var(--muted); font-size: .75rem; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; }
.profile-info-item strong { display: block; margin-top: 5px; color: var(--ink); overflow-wrap: anywhere; }
.profile-sections {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 16px;
}
.contact-team {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.whatsapp-card {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid rgba(20,128,74,.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, var(--green-soft));
  text-decoration: none;
  color: var(--ink);
}
.whatsapp-person { display: flex; gap: 12px; align-items: center; }
.whatsapp-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 12px 24px rgba(20,128,74,.18);
}
.whatsapp-card strong { color: var(--brand); }
.whatsapp-card small { display: block; color: var(--muted); font-weight: 800; margin-top: 2px; }
.whatsapp-cta {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: .78rem;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.profile-empty-note { color: var(--muted); margin-bottom: 14px; }

@media (max-width: 760px) {
  .support-grid, .profile-info-grid, .profile-sections { grid-template-columns: 1fr; }
  .profile-main, .profile-identity { align-items: flex-start; }
  .profile-identity { flex-direction: column; }
  .whatsapp-card { align-items: flex-start; flex-direction: column; }
}

/* Melhorias solicitadas: leitura do perfil, dashboard, anexos e acesso via Enter */
.profile-title {
  padding: 10px 14px;
  border: 1px solid rgba(220, 227, 238, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 28px rgba(4, 26, 87, .12);
  backdrop-filter: blur(8px);
}
.profile-title h2 { color: var(--ink); text-shadow: none; }
.profile-title p { color: #475467; }
.profile-cover {
  background:
    radial-gradient(circle at 90% 10%, rgba(237, 28, 46, .16), transparent 28%),
    linear-gradient(135deg, #071f66 0%, #082b88 52%, #3446a3 100%);
}
.profile-avatar { background: linear-gradient(135deg, #ed1c2e, #041a57); }

.admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric.metric-blue { border-top-color: var(--blue); }
.metric.metric-red { border-top-color: var(--red); }
.metric.metric-amber { border-top-color: var(--amber); }
.metric.metric-green { border-top-color: var(--green); }
.metric.metric-green strong { color: var(--green); }
.metric.metric-amber strong { color: var(--amber); }
.metric.metric-red strong { color: var(--red-2); }
.metric.metric-blue strong { color: var(--brand); }
.stat-list.wide .stat-row { grid-template-columns: minmax(0, 1fr) auto; }

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.attachment-card {
  overflow: hidden;
  border: 1px solid rgba(220, 227, 238, .95);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow-sm);
}
.attachment-card img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--surface-3);
}
.file-preview {
  display: grid;
  place-items: center;
  height: 170px;
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 1000;
  text-decoration: none;
}
.muted-file { color: var(--muted); }
.attachment-info { padding: 13px; }
.attachment-info strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.attachment-info small { display: block; margin-top: 4px; color: var(--muted); font-weight: 800; }
.attachment-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.attachment-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(8, 43, 136, .16);
  background: #fff;
  color: var(--brand);
  font-size: .78rem;
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 1020px) {
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .admin-metrics { grid-template-columns: 1fr; }
}
