/* Sistema pages visual refresh. Only Manual/Configurar content changes visually. */
#manual.view.active,
#settings.view.active {
  position: relative;
  min-height: calc(100vh - var(--topbar-height, 112px));
  padding: 28px 38px 42px;
  overflow: auto;
  background:
    radial-gradient(circle at 90% 98%, rgba(0, 87, 217, 0.08) 0 1.4px, transparent 1.65px) 0 0 / 13px 13px,
    linear-gradient(180deg, #f8fbff 0%, #f6f8fc 100%);
}

#manual.view.active::before,
#settings.view.active::before {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -175px;
  width: 690px;
  height: 380px;
  border-radius: 58% 42% 0 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 87, 217, 0.075) 0 1.5px, transparent 1.75px) 0 0 / 12px 12px;
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
}

#manual .manual-layout,
#settings .settings-layout {
  position: relative;
  z-index: 1;
}

#manual .manual-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

#manual .manual-panel,
#settings .settings-card {
  margin: 0;
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 44px rgba(7, 26, 68, 0.08);
}

#manual .manual-panel {
  min-height: 430px;
  padding: 34px 34px 32px;
  overflow: hidden;
  position: relative;
}

#manual .manual-panel:nth-child(2) {
  padding-bottom: 210px;
}

#manual .panel-heading,
#settings .panel-heading {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
}

#manual .panel-heading h2,
#settings .panel-heading h2 {
  position: relative;
  margin: 0;
  padding-left: 58px;
  color: #071a44;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

#manual .panel-heading h2::before,
#settings .panel-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #1767d8;
  box-shadow: 0 12px 22px rgba(23, 103, 216, 0.22);
}

#manual .panel-heading h2::after,
#settings .panel-heading h2::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background: #ffffff;
  -webkit-mask: var(--system-title-icon) center / contain no-repeat;
  mask: var(--system-title-icon) center / contain no-repeat;
}

#manual .manual-panel:nth-child(1) .panel-heading h2 {
  --system-title-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2Z'/%3E%3C/g%3E%3C/svg%3E");
}

#manual .manual-panel:nth-child(2) .panel-heading h2 {
  --system-title-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L8 7H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-1.5-3Z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

#manual .manual-block {
  position: relative;
  margin: 0;
  padding: 0 0 26px 58px;
}

#manual .manual-panel:nth-child(1) .manual-block + .manual-block {
  padding-top: 24px;
  border-top: 1px solid #dbe4f2;
}

#manual .manual-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8f0ff;
}

#manual .manual-block::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 22px;
  height: 22px;
  background: #1767d8;
  -webkit-mask: var(--manual-block-icon) center / contain no-repeat;
  mask: var(--manual-block-icon) center / contain no-repeat;
}

#manual .manual-panel:nth-child(1) .manual-block:nth-of-type(1) {
  --manual-block-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v10'/%3E%3Cpath d='M8 6h8'/%3E%3Cpath d='M7 12h10v3a5 5 0 0 1-10 0v-3Z'/%3E%3Cpath d='M12 20v2'/%3E%3C/g%3E%3C/svg%3E");
}

#manual .manual-panel:nth-child(1) .manual-block:nth-of-type(2) {
  --manual-block-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/g%3E%3C/svg%3E");
}

#manual .manual-panel:nth-child(2) .manual-block {
  --manual-block-icon: none;
  padding-left: 0;
}

#manual .manual-panel:nth-child(2) .manual-block::before,
#manual .manual-panel:nth-child(2) .manual-block::after {
  display: none;
}

#manual .manual-panel h3 {
  margin: 0 0 12px;
  color: #0057d9;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
}

#manual .manual-steps {
  margin: 0;
  padding-left: 20px;
  color: #071a44;
  font-size: 15px;
  line-height: 1.85;
  font-weight: 700;
}

#manual .manual-steps li + li {
  margin-top: 2px;
}

#manual .manual-steps li::marker {
  color: #071a44;
  font-weight: 900;
}

#manual .manual-panel:nth-child(2)::before {
  content: "";
  position: absolute;
  left: 22%;
  right: -12%;
  bottom: -28px;
  height: 160px;
  border-radius: 55% 45% 0 0;
  background: linear-gradient(135deg, rgba(222, 235, 255, 0.86), rgba(246, 250, 255, 0.96));
  z-index: 0;
}

#manual .manual-panel:nth-child(2)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 220px;
  height: 128px;
  transform: translateX(-50%);
  border-radius: 12px;
  background:
    linear-gradient(#ef1736, #ef1736) 50% 58% / 180px 3px no-repeat,
    repeating-linear-gradient(90deg, #071a44 0 4px, transparent 4px 9px, #071a44 9px 12px, transparent 12px 18px) 50% 54% / 128px 56px no-repeat,
    linear-gradient(#1767d8, #1767d8) 22px 20px / 28px 4px no-repeat,
    linear-gradient(#1767d8, #1767d8) 22px 20px / 4px 28px no-repeat,
    linear-gradient(#1767d8, #1767d8) calc(100% - 50px) 20px / 28px 4px no-repeat,
    linear-gradient(#1767d8, #1767d8) calc(100% - 26px) 20px / 4px 28px no-repeat,
    linear-gradient(#1767d8, #1767d8) 22px calc(100% - 24px) / 28px 4px no-repeat,
    linear-gradient(#1767d8, #1767d8) 22px calc(100% - 48px) / 4px 28px no-repeat,
    linear-gradient(#1767d8, #1767d8) calc(100% - 50px) calc(100% - 24px) / 28px 4px no-repeat,
    linear-gradient(#1767d8, #1767d8) calc(100% - 26px) calc(100% - 48px) / 4px 28px no-repeat,
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 45px rgba(23, 103, 216, 0.08);
  z-index: 1;
}

#manual .manual-panel:nth-child(2) .manual-block,
#manual .manual-panel:nth-child(2) .panel-heading {
  position: relative;
  z-index: 2;
}

#settings .settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#settings .settings-card {
  min-height: 0;
  padding: 24px 26px;
  overflow: hidden;
}

#settings .settings-template-card,
#settings .settings-server-card {
  grid-column: 1 / -1;
}

#settings .settings-card[hidden] {
  display: none;
}

#settings .settings-card-active {
  grid-column: 1 / -1;
}

#settings .settings-manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#settings .settings-manual-block {
  border: 1px solid rgba(0, 87, 217, 0.16);
  border-radius: 8px;
  background: #f8fbff;
  padding: 18px;
}

#settings .settings-manual-block h3 {
  margin: 0 0 12px;
  color: #071a3d;
  font-size: 1rem;
}

#settings .settings-manual-block .manual-steps {
  margin: 0;
  padding-left: 20px;
}

#settings .settings-manual-block .manual-steps li {
  color: #365072;
  line-height: 1.55;
}

#settings .panel-heading h2 {
  --system-title-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5A3.5 3.5 0 1 0 12 8a3.5 3.5 0 0 0 0 7.5Z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 8.92 4.6 1.65 1.65 0 0 0 10 3.09V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9c.14.48.52.86 1 1H21a2 2 0 1 1 0 4h-.09c-.48.14-.86.52-1 1Z'/%3E%3C/g%3E%3C/svg%3E");
}

#settings .form-grid,
#settings .settings-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
  margin: 18px 0 22px;
}

#settings .form-grid label,
#settings .settings-form-grid label {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
  color: #09265a;
  font-size: 15px;
  font-weight: 900;
}

#settings .form-grid label::after,
#settings .settings-form-grid label::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 132px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8ca0c3;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v5h1'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v5h1'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#settings .form-grid label:nth-child(2)::after,
#settings .settings-form-grid label:nth-child(2)::after {
  left: 145px;
}

#settings .form-grid input,
#settings .settings-form-grid input,
#settings .settings-form-grid select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #b9cff3;
  border-radius: 5px;
  background: #ffffff;
  color: #071a44;
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#settings .settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}

#settings .settings-actions button {
  min-width: 150px;
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

#settings #saveSettingsBtn,
#settings #clearBtn,
#settings #configConnectCountBtn {
  min-width: 170px;
  height: 52px;
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}

#settings #saveSettingsBtn {
  border: 1px solid #ef1736;
  background: #ef1736;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(239, 23, 54, 0.18);
}

#settings #configConnectCountBtn {
  border: 1px solid #ef1736;
  background: #ef1736;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(239, 23, 54, 0.18);
}

#settings #clearBtn {
  border: 1px solid #ff9aa9;
  background: #fff5f6;
  color: #ef1736;
}

#settings .document-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 16px;
}

#settings .document-template-item {
  min-height: 116px;
  padding: 16px;
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  background: #f8fbff;
}

#settings .document-template-item > span,
#settings .document-template-item > strong {
  display: block;
}

#settings .document-template-item > span {
  color: #536487;
  font-size: 12px;
  font-weight: 900;
}

#settings .document-template-item > strong {
  margin: 6px 0 14px;
  color: #071a44;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

#settings .settings-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dbe4f2;
}

#settings .compact-heading {
  margin-bottom: 10px;
}

#settings .compact-heading h3 {
  margin: 0;
  color: #071a44;
  font-size: 16px;
  font-weight: 900;
}

#settings .compact-heading .small-button {
  min-width: 92px;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
}

#settings .mobile-device-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

#settings .mobile-device-list.empty-state {
  padding: 12px;
  border: 1px dashed #c9d8ef;
  border-radius: 8px;
  color: #536487;
  font-size: 12px;
  font-weight: 800;
}

#settings .mobile-device-row {
  display: grid;
  grid-template-columns: 38px minmax(160px, 1fr) minmax(110px, auto) minmax(140px, auto) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #ffffff;
}

#settings .mobile-device-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eaf4ff;
  position: relative;
}

#settings .mobile-device-icon::before {
  content: "";
  position: absolute;
  inset: 8px 11px;
  border: 2px solid #0f63d8;
  border-radius: 4px;
}

#settings .mobile-device-row strong {
  display: block;
  color: #071a44;
  font-size: 13px;
  font-weight: 900;
}

#settings .mobile-device-row small,
#settings .mobile-device-channel,
#settings .mobile-device-last {
  color: #536487;
  font-size: 11px;
  font-weight: 800;
}

#settings .device-pill {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

#settings .device-pill.online {
  background: #dcfaeb;
  color: #078451;
}

#settings .device-pill.offline {
  background: #fee4e2;
  color: #b42318;
}

#settings .mobile-users-table-wrap {
  max-height: 240px;
  margin-top: 12px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
}

#settings .mobile-users-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

#settings .mobile-users-table-wrap th,
#settings .mobile-users-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid #e7edf7;
  color: #071a44;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

#settings .mobile-users-table-wrap th {
  background: #eef4fc;
  font-weight: 900;
}

#settings .mobile-users-table-wrap td {
  font-weight: 800;
}

#settings .mobile-users-table-wrap .secondary-button,
#settings .mobile-users-table-wrap .danger-button {
  min-width: 94px;
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

#settings .settings-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #b9cff3;
  border-radius: 6px;
  background: #ffffff;
  color: #0066ff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

#settings .mobile-installer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

#settings .mobile-installer-summary article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #f8fbff;
}

#settings .mobile-installer-summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #0066ff;
  font-size: 15px;
  font-weight: 900;
}

#settings .mobile-installer-summary span {
  color: #314363;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

#settings .mobile-install-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#settings .mobile-install-link-grid input {
  font-size: 13px;
  font-weight: 800;
}

#settings #saveSettingsBtn::before,
#settings #clearBtn::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--settings-button-icon) center / contain no-repeat;
  mask: var(--settings-button-icon) center / contain no-repeat;
}

#settings #saveSettingsBtn {
  --settings-button-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/g%3E%3C/svg%3E");
}

#settings #clearBtn {
  --settings-button-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/g%3E%3C/svg%3E");
}

@media (max-width: 1400px) {
  #manual.view.active,
  #settings.view.active {
    padding: 24px 30px 36px;
  }

  #manual .manual-layout {
    gap: 20px;
  }

  #manual .manual-panel {
    padding: 28px;
  }

  #settings .settings-layout,
  #settings .document-template-grid,
  #settings .settings-manual-grid {
    grid-template-columns: 1fr;
  }
}
.settings-card-active {
  border-color: rgba(0, 87, 217, 0.42);
  box-shadow: 0 14px 36px rgba(0, 87, 217, 0.1);
}

.settings-profile-card input[readonly] {
  color: #071a3d;
  background: #f3f7fc;
  font-weight: 800;
}

.account-layout {
  display: grid;
  gap: 18px;
}

.personal-layout {
  display: grid;
  gap: 18px;
}

.account-card {
  max-width: 760px;
}

.personal-card {
  max-width: 980px;
}

.account-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-form-grid input[readonly] {
  color: #071a3d;
  background: #f3f7fc;
  font-weight: 800;
}

.account-actions {
  justify-content: flex-start;
}

.account-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.personal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-help-grid article {
  min-height: 118px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}

.personal-grid article {
  min-height: 132px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}

.account-help-grid strong {
  color: #071a3d;
  font-size: 15px;
}

.personal-grid strong {
  color: #071a3d;
  font-size: 15px;
}

.account-help-grid span {
  color: #52627a;
  line-height: 1.45;
}

.personal-grid span {
  color: #52627a;
  line-height: 1.45;
}

.personal-table-wrap {
  max-height: 360px;
}

@media (max-width: 900px) {
  .account-form-grid,
  .account-help-grid,
  .personal-grid,
  #settings .mobile-installer-summary,
  #settings .mobile-install-link-grid {
    grid-template-columns: 1fr;
  }
}
