:root {
  --bg: #f4f0e7;
  --bg-soft: #fbfaf6;
  --card: #fffdfa;
  --card-2: #f8f4ec;
  --text: #1a2440;
  --muted: #67708a;
  --line: #eadfcb;
  --primary: #041f4d;
  --primary-dark: #021332;
  --primary-soft: #edf1f8;
  --gold: #c79a2b;
  --gold-soft: #fff4da;
  --green: #17734a;
  --orange: #a96300;
  --red: #b42318;
  --shadow: 0 18px 42px rgba(2, 19, 50, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(199, 154, 43, .10), transparent 28%),
    radial-gradient(circle at top right, rgba(4, 31, 77, .08), transparent 26%),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
a { color: inherit; }

.portal-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 18px auto 28px;
}

.portal-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(2,19,50,.98), rgba(4,31,77,.96)),
    #041f4d;
  border: 1px solid rgba(199,154,43,.55);
  box-shadow: 0 22px 48px rgba(2,19,50,.26);
}
.portal-hero img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(199,154,43,.4);
  background: #000;
}
.hero-kicker, .eyebrow, .section-kicker {
  display: block;
  margin-bottom: 8px;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 800;
}
.hero-kicker { color: #f1d58e; }
.section-kicker { color: var(--gold); }
.portal-hero h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
}
.portal-hero p { margin: 0; max-width: 880px; line-height: 1.6; color: rgba(255,255,255,.90); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.hidden { display: none !important; }

.login-card {
  max-width: 540px;
  margin: 26px auto 0;
  background: rgba(255,253,250,.98);
}
.login-heading h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 32px; }
.login-heading p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; gap: 10px; }
.form-grid label { font-weight: 700; font-size: 13px; }

input, select, textarea {
  width: 100%;
  border: 1px solid #d8d4cb;
  border-radius: 15px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: .18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199,154,43,.13);
}
textarea { min-height: 110px; resize: vertical; }

.btn {
  border: 1px solid transparent;
  border-radius: 15px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: .18s ease;
}
.btn:disabled { opacity: .65; cursor: wait; }
.btn.primary {
  background: linear-gradient(180deg, #08285f, #041f4d);
  color: #fff;
  border-color: rgba(199,154,43,.6);
}
.btn.primary:hover { background: linear-gradient(180deg, #0a2f71, #05255b); }
.btn.ghost {
  background: #fff;
  color: var(--primary);
  border-color: #d9d4c8;
}
.btn.ghost:hover { background: var(--bg-soft); }
.btn.gold { background: var(--gold-soft); color: #7b5700; border-color: #efd498; }
.btn.gold:hover { background: #faebc4; }
.btn.compact { padding: 8px 11px; font-size: 12px; }
.btn.full { width: 100%; }

.message {
  padding: 13px;
  border-radius: 15px;
  margin-top: 14px;
  background: #eff5ff;
  color: var(--primary);
  line-height: 1.45;
}
.message.error { background: #ffe9e7; color: var(--red); }
.cadastro-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.cadastro-box p { margin: 7px 0 13px; color: var(--muted); }
.cadastro-box small { display: block; margin-top: 9px; color: var(--muted); }

.dashboard-layout {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
}

.dashboard-sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  min-height: calc(100vh - 40px);
  padding: 20px 16px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #03122d 0%, #041f4d 62%, #031736 100%);
  border: 1px solid rgba(199,154,43,.55);
  color: #fff;
  box-shadow: 0 22px 48px rgba(2,19,50,.24);
}
.sidebar-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 8px 8px 18px;
}
.sidebar-brand img {
  width: 156px;
  height: 156px;
  object-fit: cover;
  border-radius: 20px;
  background: #000;
  border: 1px solid rgba(199,154,43,.45);
}
.sidebar-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  letter-spacing: .04em;
}
.sidebar-brand span { color: #efd79a; font-size: 14px; }

.sidebar-menu {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.sidebar-link {
  width: 100%;
  border: 1px solid rgba(199,154,43,.18);
  background: transparent;
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: linear-gradient(180deg, rgba(13,55,120,.95), rgba(6,35,83,.96));
  border-color: rgba(199,154,43,.55);
}
.menu-badge {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(199,154,43,.22);
  color: #fff2cc;
  font-size: 12px;
}
.sidebar-help {
  margin-top: 26px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(199,154,43,.32);
  border-radius: 20px;
  background: rgba(255,255,255,.03);
}
.sidebar-help strong { font-size: 21px; font-family: Georgia, "Times New Roman", serif; }
.sidebar-help span { color: rgba(255,255,255,.78); }
.sidebar-help .btn { border-color: rgba(199,154,43,.55); background: transparent; color: #f6dd9b; }
.sidebar-help .btn:hover { background: rgba(255,255,255,.05); }
.sidebar-footer {
  margin-top: 22px;
  padding: 14px 4px 0;
  border-top: 1px solid rgba(199,154,43,.20);
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.66);
  font-size: 12px;
  line-height: 1.55;
}

.dashboard-main {
  display: grid;
  gap: 18px;
  align-content: start;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.topline-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
}
.topline-copy > span:last-child,
.topline-copy #clienteEmail,
.topline-copy #clienteCpf {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.eyebrow { color: var(--primary); opacity: 1; }
.topline-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.password-card { border: 1px solid #dfcfaa; }
.password-card.password-required { border: 2px solid var(--gold); box-shadow: 0 10px 30px rgba(214, 155, 36, .14); }
.password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.password-form label { display: grid; gap: 7px; font-weight: 700; color: #233956; }
.password-form .form-submit-row { grid-column: 1 / -1; }

.grid-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  background: linear-gradient(180deg, #fffdf9, #fbf7ef);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font-size: 32px; font-family: Georgia, "Times New Roman", serif; color: var(--primary); }

.company-switcher-card { display: grid; gap: 18px; }
.company-switcher-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.company-switcher-top h2,
.card-header h2,
.history-heading h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  font-family: Georgia, "Times New Roman", serif;
}
.company-switcher-top p,
.card-header p,
.history-heading span { color: var(--muted); margin: 0; line-height: 1.55; }
.company-select-label { min-width: min(520px, 100%); font-weight: 700; display: grid; gap: 6px; }
.company-select-label select {
  background: linear-gradient(180deg, #08285f, #041f4d);
  color: #fff;
  border-color: rgba(199,154,43,.6);
}
.company-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.company-details-grid > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9, #faf6ee);
  display: grid;
  gap: 8px;
  position: relative;
  min-height: 106px;
}
.company-details-grid > div::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--gold-soft);
  border: 1px solid #efd59b;
  position: absolute;
  top: 16px;
  left: 16px;
}
.company-details-grid > div span,
.company-details-grid > div strong {
  position: relative;
  z-index: 1;
  padding-left: 56px;
}
.company-details-grid > div span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .04em;
}
.company-details-grid > div strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 15px;
}
.company-details-grid > div.wide { grid-column: span 2; min-height: 116px; }

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  position: sticky;
  top: 8px;
  z-index: 20;
  background: rgba(255,253,250,.88);
  backdrop-filter: blur(8px);
}
.portal-nav .btn { min-height: 52px; }
.nav-badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.compact-header { margin-bottom: 14px; }
.card-header input { max-width: 360px; }

.cnae-card { overflow: hidden; }
.cnae-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.cnae-table thead th {
  background: linear-gradient(180deg, #08285f, #041f4d);
  color: #f7d78b;
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: .04em;
}
.cnae-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid #ece4d5;
  vertical-align: top;
  line-height: 1.5;
}
.cnae-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.documentos-lista, .mensagens-lista { display: grid; gap: 13px; }
.doc-card, .message-history-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfa, #faf7f1);
}
.cadastral-card { border-left: 4px solid var(--primary); }
.doc-category {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.doc-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.doc-title, .message-history-card h4 { margin: 0 0 6px; font-size: 20px; font-family: Georgia, "Times New Roman", serif; }
.doc-meta { color: var(--muted); font-size: 13px; line-height: 1.55; }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}
.badge.green { background: #e7f5ee; color: var(--green); }
.badge.orange { background: #fff2dd; color: var(--orange); }
.badge.red { background: #ffe8e6; color: var(--red); }
.doc-details { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.doc-details strong, .payment-grid strong, .certificate-grid strong { color: var(--text); }
.doc-body { margin: 14px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.files-heading { margin-top: 15px; font-weight: 700; font-size: 13px; }
.anexos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.attachment-button {
  background: var(--primary-soft);
  color: var(--primary);
  text-align: left;
  max-width: 100%;
  border-color: #d4dff0;
}
.attachment-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 32px; border: 1px dashed var(--line); border-radius: 16px; }
.compact-empty { padding: 18px; }

.payment-info {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
}
.payment-info.pending { border-left: 4px solid var(--orange); }
.payment-info.confirmed { border-left: 4px solid var(--green); }
.payment-grid, .certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  font-size: 13px;
  color: var(--muted);
}
.payment-info p, .payment-confirmed p, .conversation p { margin: 8px 0 0; line-height: 1.55; }
.payment-confirmed {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #e7f5ee;
  color: var(--green);
}
.payment-confirmed span { font-size: 13px; }
.payment-confirmed p { color: var(--text); }
.conversation-list { display: grid; gap: 9px; margin-top: 14px; }
.conversation { border-radius: 13px; padding: 12px 14px; border: 1px solid var(--line); }
.conversation.office { background: #fffaf0; border-left: 4px solid var(--gold); }
.conversation.client { background: var(--primary-soft); border-left: 4px solid var(--primary); }
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.doc-form {
  flex: 0 0 100%;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}
.doc-form > .btn { justify-self: start; }
.form-help { margin: -4px 0 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.payment-form-grid, .contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.payment-form-grid label, .contact-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.payment-form-grid .full, .contact-form .full { grid-column: 1 / -1; }
.certificate-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fffaf0;
  border: 1px solid #eedca9;
}
.password-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eedca9;
  font-size: 13px;
}
.certificate-password {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2c66e;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
  user-select: all;
}
.contact-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa, #faf7f1);
}
.contact-form small { color: var(--muted); font-weight: 400; }
.form-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-status { color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-status.success { color: var(--green); }
.form-status.warning { color: var(--orange); }
.form-status.error { color: var(--red); }
.secure-message-note {
  padding: 14px 16px;
  border: 1px solid #e7dcc7;
  border-radius: 15px;
  background: #fcf8f0;
  display: grid;
  gap: 5px;
}
.secure-message-note span { color: var(--muted); font-size: 13px; }
.history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 22px 0 12px;
}
.message-replies { display: grid; gap: 10px; margin-top: 10px; }
.message-reply {
  border: 1px solid #e6dcc8;
  background: #fbf7ef;
  border-radius: 14px;
  padding: 12px;
}
.message-reply strong, .message-reply small { display: block; }
.message-reply small { margin-top: 3px; color: #61718a; }
.message-reply p { margin: 8px 0 0; line-height: 1.5; }

.security-note {
  display: flex;
  gap: 10px 14px;
  align-items: center;
  padding: 6px 4px 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.security-note strong { color: var(--primary); }

.portal-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(440px, calc(100% - 40px));
  padding: 13px 16px;
  border-radius: 15px;
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 16px 38px rgba(13, 40, 82, .28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
  z-index: 9999;
}
.portal-toast.show { opacity: 1; transform: translateY(0); }
.portal-toast.error { background: var(--red); }

@media (max-width: 1240px) {
  .grid-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .company-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: static;
    min-height: auto;
    display: grid;
    gap: 16px;
  }
  .sidebar-brand img { width: 116px; height: 116px; }
  .sidebar-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .portal-hero { align-items: flex-start; }
  .portal-hero img { width: 82px; height: 82px; }
  .portal-hero h1 { font-size: 29px; }
  .topline, .card-header, .doc-top, .history-heading, .security-note { flex-direction: column; align-items: stretch; }
  .grid-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .password-form, .payment-grid, .payment-form-grid, .certificate-grid, .contact-form { grid-template-columns: 1fr; }
  .payment-form-grid .full, .contact-form .full, .password-form .form-submit-row { grid-column: auto; }
  .card-header input, .company-select-label { max-width: none; min-width: 0; }
  .company-switcher-top { flex-direction: column; align-items: stretch; }
  .portal-nav { position: static; }
}
@media (max-width: 560px) {
  .portal-shell { width: min(100% - 14px, 1440px); margin-top: 10px; }
  .portal-hero, .card, .dashboard-sidebar { border-radius: 20px; }
  .portal-hero, .card, .dashboard-sidebar { padding: 16px; }
  .grid-metrics { grid-template-columns: 1fr; }
  .company-details-grid { grid-template-columns: 1fr; }
  .company-details-grid > div.wide { grid-column: auto; }
  .sidebar-menu { grid-template-columns: 1fr; }
}

/* Ajustes finais de visual da troca de empresa e anexos */
.company-select-label select {
  background: linear-gradient(180deg, #fffdf9, #f7f1e5) !important;
  color: var(--primary) !important;
  border: 1px solid #d8c291 !important;
  font-weight: 700;
}
.company-select-label select:focus {
  background: #fff !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(199,154,43,.15) !important;
}

.company-details-grid > div::before {
  background: linear-gradient(180deg, #f8edcf, #efe0b7) !important;
  border-color: #dfc178 !important;
}
.company-details-grid > div::after {
  content: attr(data-icon);
  position: absolute;
  top: 25px;
  left: 27px;
  z-index: 2;
  font-size: 18px;
  line-height: 1;
}

.anexos {
  display: grid !important;
  gap: 10px;
}
.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e7dcc7;
  border-radius: 14px;
  background: #fff;
}
.attachment-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
}
.attachment-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.attachment-button.compact,
.attachment-actions .btn.compact {
  min-width: 78px;
}

@media (max-width: 700px) {
  .attachment-row {
    flex-direction: column;
    align-items: stretch;
  }
  .attachment-actions {
    width: 100%;
  }
  .attachment-actions .btn.compact {
    flex: 1 1 0;
  }
}

.help-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.help-phone {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  line-height: 1.45;
}

.boleto-code-box{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;padding:16px;border:1px solid #c9a227;border-radius:12px;background:#fffaf0}.boleto-code-box>div{min-width:0}.boleto-code-box code{display:block;margin-top:8px;font-size:15px;font-weight:700;word-break:break-all;color:#152238}.boleto-code-box .section-title{display:block;color:#7a5c00}@media(max-width:700px){.boleto-code-box{align-items:stretch;flex-direction:column}.boleto-code-box .btn{width:100%}}

/* Redesign premium 17/07/2026 */
:root {
  --primary: #062653;
  --primary-dark: #03162f;
  --gold: #d9a62e;
  --gold-soft: #fff5dc;
  --line: #dfe7f1;
  --card: #ffffff;
  --bg: #f4f7fb;
  --shadow: 0 12px 34px rgba(5, 30, 68, .08);
}
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; background: #f4f7fb; }
.portal-shell { width: min(1680px, calc(100% - 24px)); margin: 12px auto 24px; }
.portal-hero { border-radius: 22px; padding: 20px 24px; background: linear-gradient(135deg,#041a3a,#07346f); }
.portal-hero img { width: 82px; height: 82px; object-fit: contain; background: transparent; border: 0; }
.portal-hero h1, .login-heading h2, .topline-copy strong, .sidebar-brand strong { font-family: inherit; }
.card { border-radius: 20px; border-color: var(--line); box-shadow: var(--shadow); }
.dashboard-layout { grid-template-columns: 286px minmax(0,1fr); gap: 18px; }
.dashboard-sidebar { border-radius: 22px; background: linear-gradient(180deg,#041a3a 0%,#062a59 100%); border: 0; }
.sidebar-brand { grid-template-columns: 64px 1fr; justify-items: start; text-align: left; align-items: center; column-gap: 12px; }
.sidebar-brand img { width: 64px; height: 64px; object-fit: contain; border: 0; border-radius: 18px; background: transparent; grid-row: 1 / span 2; }
.sidebar-brand strong { font-size: 24px; line-height: 1; }
.sidebar-brand span { font-size: 12px; }
.sidebar-link { justify-content: flex-start; padding: 12px 13px; border-radius: 13px; border-color: rgba(255,255,255,.08); }
.sidebar-link > span:nth-child(2) { flex: 1; text-align: left; }
.sidebar-link.active { background: #fff; color: var(--primary); border-color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.13); }
.menu-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); flex: 0 0 auto; }
.sidebar-link.active .menu-icon { background: #eef4fb; }
.menu-icon svg, .summary-icon svg, .company-info-icon svg, .file-type-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topline { padding: 18px 22px; }
.company-switcher-card { padding: 24px; }
.company-switcher-top { align-items: end; }
.dashboard-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.summary-card { min-height: 126px; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.summary-icon { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.summary-card.navy .summary-icon { background: #eaf1fb; color: #0b3977; }
.summary-card.gold .summary-icon { background: #fff1c9; color: #a66d00; }
.summary-card.success .summary-icon { background: #e4f7ed; color: #168153; }
.summary-card strong { display: block; font-size: 30px; line-height: 1; color: var(--primary-dark); }
.summary-card span:not(.summary-icon) { display: block; margin-top: 7px; font-weight: 800; color: #243653; }
.summary-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.company-details-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.company-details-grid > div { position: relative; min-height: 150px; padding: 22px 18px 18px 76px; border-radius: 18px; background: #fff; border: 1px solid #e2e9f2; box-shadow: 0 8px 24px rgba(5,30,68,.05); overflow: hidden; }
.company-details-grid > div.wide { grid-column: span 2; }
.company-info-icon { position: absolute; left: 18px; top: 18px; width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(145deg,#071d40,#0b3977); color: #f4c75d; box-shadow: 0 8px 18px rgba(4,31,77,.18); }
.company-details-grid > div > span:not(.company-info-icon) { display:block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; font-weight: 800; color: #61708b; }
.company-details-grid > div strong { display:block; margin-top: 16px; font-size: 16px; line-height: 1.5; color: #142340; }
.documents-card, .contact-card, .cnae-card { padding: 24px; }
.doc-card { border-radius: 18px !important; border: 1px solid #e1e8f1 !important; box-shadow: 0 8px 24px rgba(5,30,68,.05); }
.boleto-code-box { border-radius: 16px !important; border: 1px solid #e8c468 !important; background: linear-gradient(180deg,#fffdf7,#fff7e7) !important; }
.boleto-code-box code { display:block; margin-top:8px; font-size:14px; letter-spacing:.05em; color:#08275a; word-break:break-all; }
.attachment-row { border-radius: 14px !important; background: #f8fafc !important; border: 1px solid #e4ebf3 !important; }
.file-type-icon { position: relative; width: 38px; height: 42px; border-radius: 9px; display:inline-flex; align-items:center; justify-content:center; background:#fff0ef; color:#d82b27; border:1px solid #ffd0cd; flex:0 0 auto; }
.file-type-icon svg { width:20px; height:20px; }
.file-type-icon small { position:absolute; bottom:2px; font-size:7px; font-weight:900; }
.certificate-box { border-radius: 16px !important; background: linear-gradient(135deg,#061b3d,#0a326d) !important; color:#fff; border: 1px solid rgba(217,166,46,.65) !important; }
.certificate-box .doc-meta, .certificate-box span { color: rgba(255,255,255,.9); }
.security-note { border-radius: 16px; }
@media (max-width: 1280px) { .dashboard-summary { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 980px) { .dashboard-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } .company-details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .dashboard-summary { grid-template-columns: 1fr; } .company-details-grid { grid-template-columns: 1fr; } .company-details-grid > div.wide { grid-column: span 1; } }

/* Refino visual profissional da Área do Cliente 17/07/2026 */
.portal-app .card {
  overflow: hidden;
}
.topline {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}
.topline-copy strong {
  font-size: 28px;
  letter-spacing: -.02em;
}
.topline-copy span:not(.eyebrow) {
  color: #62728d;
}
.dashboard-summary .summary-card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-summary .summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(5,30,68,.10);
}
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.portal-nav .btn {
  min-width: 180px;
}
.card-header h2,
.company-switcher-top h2,
.history-heading h3 {
  letter-spacing: -.02em;
}
.doc-card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.doc-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(5,30,68,.08);
}
.attachment-name span:last-child {
  color: #17345e;
  font-weight: 700;
}
.attachment-actions .btn.compact {
  min-height: 36px;
}
.boleto-code-box {
  align-items: flex-start !important;
}
.boleto-code-box .btn {
  white-space: nowrap;
}
.security-note {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dde6f0;
  box-shadow: 0 12px 28px rgba(5,30,68,.05);
}
.sidebar-help {
  border: 1px solid rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.04) !important;
}
.sidebar-footer {
  color: rgba(255,255,255,.76) !important;
}
@media (max-width: 780px) {
  .portal-nav .btn {
    width: 100%;
  }
}

/* Área do Cliente moderna e organizada 17/07/2026 */
:root {
  --portal-navy: #072a5a;
  --portal-navy-2: #0d3f82;
  --portal-gold: #d7a63a;
  --portal-soft: #f5f8fc;
  --portal-line: #dde6f0;
}
.portal-shell {
  width: min(1680px, calc(100% - 22px));
}
.portal-hero,
.card,
.dashboard-sidebar {
  box-shadow: 0 16px 38px rgba(5, 30, 68, .08);
}
.portal-hero {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #041a3a 0%, #0a326d 72%, #05224c 100%);
}
.portal-hero img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(215,166,58,.42);
  background: #000;
}
.portal-hero h1 {
  margin: 6px 0 6px;
  font-size: 34px;
  letter-spacing: -.03em;
}
.portal-hero p { max-width: 980px; }
.dashboard-layout {
  grid-template-columns: 286px minmax(0,1fr);
  gap: 18px;
}
.dashboard-sidebar {
  min-height: calc(100vh - 40px);
  padding: 18px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #03122d 0%, #072a5a 54%, #041835 100%);
}
.sidebar-brand {
  grid-template-columns: 78px 1fr;
  justify-items: start;
  align-items: center;
  text-align: left;
  column-gap: 14px;
  padding-bottom: 16px;
}
.sidebar-brand img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  grid-row: 1 / span 2;
  border-radius: 18px;
}
.sidebar-brand strong {
  font-size: 25px;
  line-height: 1;
}
.sidebar-brand span { font-size: 12px; }
.sidebar-menu {
  gap: 9px;
}
.sidebar-link {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  border-radius: 16px;
  padding: 11px 13px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.sidebar-link:hover {
  transform: translateX(2px);
}
.sidebar-link .menu-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  color: #efd79a;
  transition: transform .22s ease, background .22s ease, color .22s ease, box-shadow .22s ease;
}
.menu-icon svg,
.summary-icon svg,
.company-info-icon svg,
.file-type-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-link:hover .menu-icon,
.sidebar-link.active .menu-icon {
  transform: translateY(-1px) scale(1.05);
  background: #eef4fb;
  color: #082a5c;
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
}
.sidebar-link.active {
  background: #ffffff;
  color: #072a5a;
  border-color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.13);
}
.menu-badge {
  margin-left: auto;
}
.dashboard-main { gap: 18px; }
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.topline-copy strong { font-size: 28px; letter-spacing: -.02em; }
.topline-copy span:not(.eyebrow) { color: #62728d; }
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 14px;
}
.summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 124px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--portal-line);
  box-shadow: 0 10px 24px rgba(5,30,68,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.summary-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(5,30,68,.10); }
.summary-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  animation: floatSoft 3.2s ease-in-out infinite;
}
.summary-card.navy .summary-icon { background: #eaf1fb; color: #0b3977; }
.summary-card.gold .summary-icon { background: #fff1c9; color: #a66d00; }
.summary-card.success .summary-icon { background: #e4f7ed; color: #168153; }
.summary-card strong { display: block; font-size: 30px; line-height: 1; color: #041b3f; }
.summary-card span:not(.summary-icon) { display: block; margin-top: 7px; font-weight: 800; color: #243653; }
.summary-card small { display: block; margin-top: 4px; color: #6b7a93; font-size: 11px; }
.grid-metrics { display: none !important; }
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.portal-nav .btn { min-width: 180px; }
.company-switcher-card,
.documents-card,
.contact-card,
.cnae-card,
.password-card { padding: 24px; }
.company-switcher-top { align-items: end; }
.company-details-grid {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
}
.company-details-grid > div {
  position: relative;
  min-height: 146px;
  padding: 22px 18px 18px 76px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e9f2;
  box-shadow: 0 8px 24px rgba(5,30,68,.05);
  overflow: hidden;
}
.company-details-grid > div.wide { grid-column: span 2; }
.company-info-icon {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg,#071d40,#0b3977);
  color: #f4c75d;
  box-shadow: 0 8px 18px rgba(4,31,77,.18);
  animation: pulseSoft 2.8s ease-in-out infinite;
}
.company-details-grid > div > span:not(.company-info-icon) {
  display:block;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 800;
  color: #61708b;
}
.company-details-grid > div strong {
  display:block;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.55;
  color: #142340;
}
.doc-card {
  border-radius: 18px !important;
  border: 1px solid #e1e8f1 !important;
  box-shadow: 0 8px 24px rgba(5,30,68,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.doc-card:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(5,30,68,.08); }
.attachment-row {
  border-radius: 14px !important;
  background: #f8fafc !important;
  border: 1px solid #e4ebf3 !important;
}
.file-type-icon {
  position: relative;
  width: 38px;
  height: 42px;
  border-radius: 9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff0ef;
  color:#d82b27;
  border:1px solid #ffd0cd;
  flex:0 0 auto;
  animation: floatSoft 3.4s ease-in-out infinite;
}
.file-type-icon small { position:absolute; bottom:2px; font-size:7px; font-weight:900; }
.boleto-code-box {
  border-radius: 16px !important;
  border: 1px solid #e8c468 !important;
  background: linear-gradient(180deg,#fffdf7,#fff7e7) !important;
}
.certificate-box {
  border-radius: 16px !important;
  background: linear-gradient(135deg,#061b3d,#0a326d) !important;
  color:#fff; border: 1px solid rgba(217,166,46,.65) !important;
}
.security-note {
  border-radius: 16px;
  background: linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border: 1px solid #dde6f0;
  box-shadow: 0 12px 28px rgba(5,30,68,.05);
}
.card-header h2,
.company-switcher-top h2,
.history-heading h3,
.cnae-card h2,
.documents-card h2,
.contact-card h2 { letter-spacing: -.02em; }
@keyframes floatSoft {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes pulseSoft {
  0%,100% { box-shadow: 0 8px 18px rgba(4,31,77,.18); }
  50% { box-shadow: 0 12px 24px rgba(4,31,77,.26); }
}
@media (max-width: 1280px) {
  .dashboard-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; min-height: auto; }
  .company-details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topline { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .portal-hero { grid-template-columns: 1fr; text-align: center; }
  .portal-hero img { margin: 0 auto; }
  .company-details-grid,
  .dashboard-summary { grid-template-columns: 1fr; }
  .company-details-grid > div.wide { grid-column: span 1; }
  .portal-nav .btn,
  .sidebar-help .btn { width: 100%; }
}

/* Correção de legibilidade dos cartões da empresa 17/07/2026 */
.company-details-grid > div::before,
.company-details-grid > div::after {
  content: none !important;
  display: none !important;
}
.company-details-grid > div {
  padding: 22px 18px 18px 76px !important;
  min-height: 170px !important;
  overflow: visible !important;
  align-content: start !important;
}
.company-info-icon {
  left: 18px !important;
  top: 16px !important;
  padding-left: 0 !important;
}
.company-details-grid > div > span:not(.company-info-icon),
.company-details-grid > div strong {
  padding-left: 0 !important;
  position: static !important;
}
.company-details-grid > div > span:not(.company-info-icon) {
  margin-top: 2px !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
}
.company-details-grid > div strong {
  margin-top: 10px !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
.company-details-grid > div.wide {
  min-height: 132px !important;
}
.company-switcher-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) !important;
  gap: 22px !important;
  align-items: end !important;
}
.company-switcher-top p {
  max-width: 720px;
}
.company-select-label {
  width: 100% !important;
}
.company-select-label select {
  min-height: 48px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}
.documents-card .card-header,
.contact-card .card-header,
.cnae-card .card-header,
.password-card .card-header {
  gap: 14px !important;
}
.card-header p,
.company-switcher-top p,
.topline-copy span,
.documents-card p,
.contact-card p,
.cnae-card p {
  line-height: 1.55 !important;
}
.attachment-row,
.doc-card,
.boleto-code-box,
.certificate-box {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .company-switcher-top {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 700px) {
  .company-details-grid > div {
    min-height: 140px !important;
  }
  .topline-copy strong {
    font-size: 24px !important;
  }
}

/* Ajuste visual final: marca centralizada e ícones com mais cor 17/07/2026 */
.sidebar-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 8px !important;
  padding: 10px 8px 20px !important;
}
.sidebar-brand img {
  width: 94px !important;
  height: 94px !important;
  margin: 0 auto 4px !important;
  grid-row: auto !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.24) !important;
}
.sidebar-brand strong {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 27px !important;
  line-height: 1.08 !important;
  letter-spacing: .04em !important;
  text-align: center !important;
}
.sidebar-brand span {
  display: block !important;
  width: 100% !important;
  max-width: 190px !important;
  margin: 0 auto !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

/* Paleta viva e profissional para o menu da Área do Cliente */
.sidebar-menu .sidebar-link:nth-child(1) .menu-icon { background: #e8f1ff; color: #1769d2; border-color: #cfe1fb; }
.sidebar-menu .sidebar-link:nth-child(2) .menu-icon { background: #e7f8ee; color: #168653; border-color: #caecd9; }
.sidebar-menu .sidebar-link:nth-child(3) .menu-icon { background: #fff2d8; color: #b87500; border-color: #f0d7a4; }
.sidebar-menu .sidebar-link:nth-child(4) .menu-icon { background: #f2eaff; color: #7744c6; border-color: #dfcff7; }
.sidebar-menu .sidebar-link:nth-child(5) .menu-icon { background: #ffe9ed; color: #c93b55; border-color: #f4ccd5; }
.sidebar-menu .sidebar-link:hover .menu-icon,
.sidebar-menu .sidebar-link.active .menu-icon {
  filter: saturate(1.1);
  box-shadow: 0 10px 20px rgba(0,0,0,.14) !important;
}

/* Cores específicas nos cartões-resumo */
.dashboard-summary .summary-card:nth-child(1) .summary-icon { background: #e8f1ff !important; color: #1769d2 !important; }
.dashboard-summary .summary-card:nth-child(2) .summary-icon { background: #fff2d8 !important; color: #b87500 !important; }
.dashboard-summary .summary-card:nth-child(3) .summary-icon { background: #f2eaff !important; color: #7744c6 !important; }
.dashboard-summary .summary-card:nth-child(4) .summary-icon { background: #ffe9ed !important; color: #c93b55 !important; }
.dashboard-summary .summary-card:nth-child(5) .summary-icon { background: #e7f8ee !important; color: #168653 !important; }

/* Cores variadas nos cartões da empresa */
.company-details-grid > div:nth-child(1) .company-info-icon { background: linear-gradient(145deg,#0d63c9,#174d97) !important; color: #fff !important; }
.company-details-grid > div:nth-child(2) .company-info-icon { background: linear-gradient(145deg,#7a4bd0,#532d9c) !important; color: #fff !important; }
.company-details-grid > div:nth-child(3) .company-info-icon { background: linear-gradient(145deg,#cf8a19,#a76600) !important; color: #fff !important; }
.company-details-grid > div:nth-child(4) .company-info-icon { background: linear-gradient(145deg,#21a165,#147347) !important; color: #fff !important; }
.company-details-grid > div:nth-child(5) .company-info-icon { background: linear-gradient(145deg,#1591a6,#086678) !important; color: #fff !important; }
.company-details-grid > div:nth-child(6) .company-info-icon { background: linear-gradient(145deg,#db5b4e,#a8372d) !important; color: #fff !important; }
.company-details-grid > div:nth-child(7) .company-info-icon { background: linear-gradient(145deg,#d15887,#9e2b5b) !important; color: #fff !important; }
.company-details-grid > div:nth-child(8) .company-info-icon { background: linear-gradient(145deg,#2f81d6,#185b9e) !important; color: #fff !important; }

@media (max-width: 980px) {
  .sidebar-brand img { width: 86px !important; height: 86px !important; }
  .sidebar-brand strong { font-size: 24px !important; }
}

/* Ícone ao lado do título dos dados da empresa 17/07/2026 */
.company-details-grid > div {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  column-gap: 14px !important;
  row-gap: 14px !important;
  align-items: center !important;
  align-content: start !important;
  padding: 18px !important;
  min-height: 150px !important;
}
.company-details-grid > div.wide {
  min-height: 136px !important;
}
.company-info-icon {
  position: static !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center !important;
}
.company-details-grid > div > span:not(.company-info-icon) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  letter-spacing: .05em !important;
  text-align: left !important;
}
.company-details-grid > div strong {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
@media (max-width: 700px) {
  .company-details-grid > div {
    min-height: 132px !important;
  }
}

/* Correção de contraste do bloco azul dos certificados 17/07/2026 */
.certificate-box,
.certificate-box * {
  color: #ffffff !important;
}
.certificate-box {
  padding: 16px 18px !important;
}
.certificate-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.certificate-grid span,
.password-row span,
.certificate-box .doc-meta,
.certificate-box code {
  color: #ffffff !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}
.certificate-grid strong,
.password-row strong {
  color: #ffffff !important;
  font-weight: 800 !important;
}
.password-row {
  border-top: 1px solid rgba(255,255,255,.45) !important;
}
.certificate-password {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}
@media (max-width: 760px) {
  .certificate-grid {
    grid-template-columns: 1fr;
  }
}

/* Botão Mostrar senha em amarelo escuro */
.certificate-box .btn.gold,
.certificate-box button[data-action="mostrar-senha-certificado"] {
  background: linear-gradient(135deg, #c79214 0%, #9f6f00 100%) !important;
  border-color: #8d6200 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 18px rgba(123, 86, 0, .28) !important;
}
.certificate-box .btn.gold:hover,
.certificate-box button[data-action="mostrar-senha-certificado"]:hover {
  background: linear-gradient(135deg, #b57f00 0%, #855d00 100%) !important;
  border-color: #724f00 !important;
}


/* =========================================================
   TEMA ÁREA DO CLIENTE | CORES DO BRASÃO UNIÃO
   ========================================================= */
:root {
  --bg: #f7f4ea !important;
  --bg-soft: #fffbee !important;
  --card: #ffffff !important;
  --card-2: #fff7d8 !important;
  --text: #101010 !important;
  --muted: #5f5f5f !important;
  --line: #e7dcc0 !important;
  --primary: #0a0a0a !important;
  --primary-dark: #000000 !important;
  --primary-soft: #fff5c4 !important;
  --gold: #f2c400 !important;
  --gold-soft: #fff2b8 !important;
  --green: #138a4a !important;
  --orange: #c56d00 !important;
  --red: #d70015 !important;
  --shadow: 0 18px 42px rgba(0,0,0,.10) !important;
}
body {
  background:
    radial-gradient(circle at top left, rgba(242,196,0,.18), transparent 28%),
    radial-gradient(circle at top right, rgba(215,0,21,.07), transparent 24%),
    var(--bg) !important;
}
.portal-hero {
  background:
    linear-gradient(135deg, rgba(0,0,0,.98), rgba(26,26,26,.97) 55%, rgba(242,196,0,.95) 100%),
    #0a0a0a !important;
  border: 1px solid rgba(242,196,0,.65) !important;
  box-shadow: 0 24px 50px rgba(0,0,0,.20) !important;
}
.portal-hero img,
.sidebar-brand img {
  background: #fff !important;
  border: 2px solid rgba(242,196,0,.8) !important;
}
.hero-kicker,
.section-kicker,
.sidebar-brand span,
.sidebar-help .btn,
.sidebar-footer { color: #ffe591 !important; }
.portal-hero h1,
.sidebar-brand strong,
.sidebar-help strong { color: #fff !important; }
.portal-hero p,
.sidebar-help span { color: rgba(255,255,255,.86) !important; }
.card {
  border: 1px solid #e7dcc0 !important;
  box-shadow: 0 16px 34px rgba(0,0,0,.08) !important;
}
.dashboard-sidebar {
  background: linear-gradient(180deg, #050505 0%, #161616 100%) !important;
  border: 1px solid rgba(242,196,0,.55) !important;
  box-shadow: 0 22px 48px rgba(0,0,0,.22) !important;
}
.sidebar-link {
  border: 1px solid rgba(242,196,0,.18) !important;
  color: #fff3c8 !important;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: linear-gradient(180deg, #f6cf1e, #f2c400) !important;
  border-color: #f2c400 !important;
  color: #0a0a0a !important;
}
.menu-badge { background: #d70015 !important; color: #fff !important; }
.btn.primary {
  background: linear-gradient(180deg, #f8d33e, #f2c400) !important;
  color: #0a0a0a !important;
  border-color: #d4ac00 !important;
}
.btn.primary:hover { background: linear-gradient(180deg, #ffdc56, #e0b300) !important; }
.btn.ghost {
  background: #0a0a0a !important;
  color: #f2c400 !important;
  border-color: #0a0a0a !important;
}
.btn.ghost:hover { background: #1a1a1a !important; }
.btn.gold {
  background: #fff2b8 !important;
  color: #0a0a0a !important;
  border-color: #efd877 !important;
}
input, select, textarea {
  border: 1px solid #d7cfba !important;
  background: #fffef8 !important;
  color: #101010 !important;
}
input:focus, select:focus, textarea:focus {
  border-color: #f2c400 !important;
  box-shadow: 0 0 0 4px rgba(242,196,0,.16) !important;
}
.message { background: #fff7d8 !important; color: #0a0a0a !important; }
.message.error { background: #fde8ea !important; color: #b30010 !important; }
.section-title h2,
.section-title h3,
.page-title,
.summary-content strong,
.table-card h3,
.timeline-card h3 { color: #101010 !important; }
.table-card thead th,
thead th {
  background: #fff8d7 !important;
  color: #302500 !important;
  border-bottom: 1px solid #efdf99 !important;
}
.dashboard-topbar,
.sticky-actions,
.summary-card.highlight {
  background: linear-gradient(135deg, rgba(242,196,0,.15), rgba(255,255,255,.92)) !important;
  border-color: rgba(242,196,0,.35) !important;
}
.summary-icon,
.feature-icon,
.kpi-icon {
  background: #fff3c4 !important;
  color: #0a0a0a !important;
  border-color: #efd877 !important;
}
.status-pill,
.badge.blue {
  background: #fff2b8 !important;
  color: #0a0a0a !important;
}
.badge.red { background: #fde8ea !important; color: #b30010 !important; }
.badge.green { background: #eaf8f1 !important; color: #138a4a !important; }

/* Diferenciação entre certificados digitais e documentos da empresa */
#documentosCadastraisLista {
  display: grid;
  gap: 22px;
}
.document-group {
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
}
.document-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.document-group-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #102a4c;
}
.document-group-header p {
  margin: 0;
  color: #607089;
  font-size: 13px;
}
.document-group-count {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  background: #e5eaf1;
  color: #243b5a;
}
.certificate-group {
  border-color: #d4af37;
  background: linear-gradient(180deg, #fffdf5 0%, #fff 100%);
}
.certificate-group .document-group-count,
.category-certificate {
  background: #d4af37 !important;
  color: #16213b !important;
}
.company-documents-group {
  border-color: #b8cee7;
  background: linear-gradient(180deg, #f5f9ff 0%, #fff 100%);
}
.company-documents-group .document-group-count,
.category-company-document {
  background: #174f8f !important;
  color: #fff !important;
}
.digital-certificate-card {
  border-left: 5px solid #d4af37 !important;
}
.company-document-card {
  border-left: 5px solid #174f8f !important;
}
.attachment-filename {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  word-break: break-word;
}
.file-type-pfx {
  background: #d4af37 !important;
  color: #16213b !important;
}
.file-type-pdf {
  background: #174f8f !important;
  color: #fff !important;
}
.attachment-pfx {
  border-color: rgba(212, 175, 55, .55) !important;
  background: #fffdf7 !important;
}
.attachment-pdf {
  border-color: rgba(23, 79, 143, .25) !important;
  background: #f8fbff !important;
}
@media (max-width: 700px) {
  .document-group { padding: 12px; }
  .document-group-header { align-items: flex-start; }
}
