:root {
  --lm-bg: #fafafa;
  --lm-surface: #ffffff;
  --lm-surface-muted: #f8f9fc;
  --lm-line: #f1f1f1;
  --lm-line-strong: #e5e8f0;
  --lm-text: #121843;
  --lm-muted: #686868;
  --lm-dark: #121843;
  --lm-green: #18c964;
  --lm-orange: #ff6a13;
  --lm-red: #ff3346;
  --lm-blue: #2d63ff;
  --lm-shadow: 0 18px 40px rgba(18, 24, 67, 0.08);
  --lm-sidebar-start: #d8f7fb;
  --lm-sidebar-mid: #66d5df;
  --lm-sidebar-end: #27b8c6;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.mportal-manage-page {
  margin: 0;
  color: var(--lm-text);
  font-family: "Poppins", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, rgba(143, 224, 255, 0.24), transparent 22%),
    radial-gradient(circle at 84% 78%, rgba(154, 219, 255, 0.18), transparent 26%),
    linear-gradient(180deg, #f9feff 0%, #f4fbfd 100%);
}

.lm-dashboard {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.lm-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  color: #12354d;
  background: linear-gradient(180deg, var(--lm-sidebar-start) 0%, var(--lm-sidebar-mid) 52%, var(--lm-sidebar-end) 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.35);
}

.lm-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lm-sidebar-home {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.lm-sidebar-logo {
  width: 112px;
  height: auto;
  object-fit: contain;
}

.lm-sidebar-brand strong {
  display: block;
  color: #0f3140;
  font-size: 1.08rem;
  font-weight: 800;
}

.lm-sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: rgba(15, 49, 64, 0.72);
  font-size: 0.92rem;
  font-weight: 600;
}

.lm-sidebar-nav {
  display: grid;
  gap: 10px;
}

.lm-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #0e3244;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.lm-sidebar-item.is-active {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 28px rgba(13, 92, 112, 0.18);
}

.lm-sidebar-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(17, 18, 33, 0.08);
}

.lm-sidebar-item svg {
  width: 18px;
  height: 18px;
}

.lm-sidebar-footer {
  margin-top: auto;
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.lm-sidebar-footer-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #0d7786;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lm-sidebar-footer p {
  margin: 0;
  color: rgba(18, 53, 77, 0.76);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lm-main-panel {
  min-width: 0;
  padding: 24px;
}

.lm-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(200, 210, 224, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--lm-shadow);
  backdrop-filter: blur(12px);
}

.lm-topbar-search {
  flex: 1 1 420px;
}

.lm-topbar-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lm-topbar-label,
.lm-field-label {
  display: block;
  margin-bottom: 8px;
  color: #405572;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lm-input-shell,
.lm-select,
.lm-form-field input,
.lm-form-field select {
  border: 1px solid var(--lm-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.lm-input-shell {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.lm-input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7a8094;
}

.lm-input-icon svg {
  width: 18px;
  height: 18px;
}

.lm-input-shell input,
.lm-select,
.lm-form-field input,
.lm-form-field select {
  width: 100%;
  outline: 0;
  background: transparent;
  color: var(--lm-text);
  font: inherit;
}

.lm-input-shell input {
  border: 0;
  padding: 0 16px 0 0;
  font-size: 0.98rem;
}

.lm-input-shell input::placeholder {
  color: #959cb0;
}

.lm-filter-group {
  min-width: 150px;
}

.lm-select,
.lm-form-field select,
.lm-form-field input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--lm-line);
  appearance: none;
}

.lm-view-block {
  min-width: 0;
}

.lm-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--lm-line);
  border-radius: 16px;
  background: #ffffff;
}

.lm-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #6f768b;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.lm-view-btn:hover {
  transform: translateY(-1px);
}

.lm-view-btn svg {
  width: 18px;
  height: 18px;
}

.lm-view-btn.is-active {
  background: #16172a;
  color: #ffffff;
}

.lm-shell {
  width: 100%;
  max-width: 100%;
  padding: 14px 0 34px;
}

.lm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.lm-page-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.lm-page-copy p {
  margin: 8px 0 0;
  color: var(--lm-muted);
  font-size: 1rem;
}

.lm-page-actions,
.lm-card-actions,
.lm-modal-actions,
.lm-table-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--lm-surface);
  color: var(--lm-text);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.lm-btn:hover {
  transform: translateY(-1px);
}

.lm-btn svg {
  width: 18px;
  height: 18px;
}

.lm-btn-secondary,
.lm-btn-edit {
  border-color: var(--lm-line-strong);
  background: #ffffff;
}

.lm-btn-primary {
  border-color: var(--lm-dark);
  background: var(--lm-dark);
  color: #ffffff;
}

.lm-btn-trash,
.lm-btn-danger,
.lm-btn-danger-outline {
  border-color: #f0cfd4;
  color: #ff3346;
  background: #ffffff;
}

.lm-btn-trash {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.mu-users-surface .lm-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 8px;
  margin-bottom: 14px;
}

.mu-departments-surface .lm-stats {
  grid-template-columns: minmax(0, 340px);
}

.lm-stat-card,
.lm-user-card,
.lm-users-table-wrap,
.lm-empty-state {
  border: 1px solid var(--lm-line);
  background: var(--lm-surface);
  box-shadow: var(--lm-shadow);
}

.mu-users-surface .lm-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: start;
  height: auto;
  min-height: 0;
  padding: 10px 12px 9px;
  border-radius: 12px;
  border-left-width: 3px;
}

.lm-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mu-users-surface .lm-stat-label {
  color: var(--lm-muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.lm-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lm-stat-icon svg {
  width: 18px;
  height: 18px;
}

.mu-users-surface .lm-stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.42rem;
  line-height: 1;
  font-weight: 800;
}

.mu-users-surface .lm-stat-card p {
  margin: 0;
  color: var(--lm-muted);
  font-size: 0.88rem;
}

.accent-dark {
  border-left-color: #151626;
}

.accent-dark .lm-stat-icon {
  color: #7d8195;
}

.accent-green {
  border-left-color: var(--lm-green);
}

.accent-green .lm-stat-icon {
  color: var(--lm-green);
}

.accent-amber {
  border-left-color: var(--lm-orange);
}

.accent-amber .lm-stat-icon {
  color: var(--lm-orange);
}

.accent-red {
  border-left-color: var(--lm-red);
}

.accent-red .lm-stat-icon {
  color: var(--lm-red);
}

.lm-users-area {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: auto;
}

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

.lm-user-card {
  padding: 22px 24px 24px;
  border-radius: 20px;
}

.lm-user-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.lm-user-ident {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.lm-avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.lm-avatar.is-admin {
  background: #ffe8e7;
  color: #d41217;
}

.lm-avatar.is-user {
  background: #e4f8eb;
  color: #0d9752;
}

.lm-avatar.is-moderator {
  background: #e7f0ff;
  color: #1d53ff;
}

.lm-user-ident h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  font-size: 1rem;
  font-weight: 800;
}

.lm-user-ident p {
  margin: 0;
  color: var(--lm-muted);
  font-size: 0.92rem;
}

.lm-user-shield {
  display: inline-flex;
  color: #171723;
}

.lm-user-shield svg {
  width: 15px;
  height: 15px;
}

.lm-user-meta {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.lm-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lm-detail-row > span {
  color: var(--lm-muted);
}

.lm-role-badge,
.lm-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.lm-role-badge.is-admin {
  background: #ffe8e7;
  color: #d41217;
  border-color: #f3c5c3;
}

.lm-role-badge.is-user {
  background: #e4f8eb;
  color: #0d9752;
  border-color: #bfe7ce;
}

.lm-role-badge.is-moderator {
  background: #e7f0ff;
  color: #1d53ff;
  border-color: #cadcff;
}

.lm-status-badge.is-active {
  background: #101123;
  color: #ffffff;
}

.lm-status-badge.is-inactive {
  background: #f1f2f6;
  color: #5f6377;
  border-color: #e0e2e8;
}

.lm-password-inline,
.lm-password-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lm-password-inline code,
.lm-password-box code {
  min-width: 76px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #efeff3;
  color: #161722;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
}

.lm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #1a1b2f;
  cursor: pointer;
}

.lm-icon-btn svg {
  width: 17px;
  height: 17px;
}

.lm-user-divider {
  height: 1px;
  margin: 16px 0 12px;
  background: var(--lm-line);
}

.lm-last-login {
  margin: 0 0 18px;
  color: var(--lm-muted);
  font-size: 0.92rem;
}

.lm-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
}

.lm-btn-edit {
  justify-content: center;
}

.lm-users-table-wrap {
  overflow: hidden;
  border-radius: 20px;
}

.lm-users-table {
  width: 100%;
  border-collapse: collapse;
}

.lm-users-table th,
.lm-users-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--lm-line);
}

.lm-users-table th {
  background: #ffffff;
  color: var(--lm-text);
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mu-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease;
}

.mu-sort-button:hover {
  color: #0b7d79;
}

.mu-sort-button.is-active {
  color: #0b7d79;
}

.mu-sort-indicator {
  color: #98a3b8;
  font-size: 0.84rem;
  line-height: 1;
  flex-shrink: 0;
}

.mu-sort-button.is-active .mu-sort-indicator {
  color: currentColor;
}

.lm-users-table td {
  color: var(--lm-text);
  font-size: 0.96rem;
  font-weight: 500;
}

.lm-table-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lm-table-user strong,
.lm-table-user span {
  display: block;
}

.lm-table-user span {
  margin-top: 4px;
  color: var(--lm-muted);
  font-size: 0.92rem;
}

.lm-table-action {
  border: 0;
  background: transparent;
  color: #1a1b2f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lm-table-action.is-danger {
  color: #ff3346;
}

.lm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 30px;
  border-radius: 20px;
}

.lm-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #f1f2f7;
  color: #686c82;
  font-weight: 800;
}

.lm-empty-state p,
.lm-footer {
  color: var(--lm-muted);
}

.lm-footer {
  margin-top: 18px;
  font-size: 0.92rem;
}

.lm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 16, 32, 0.32);
}

.lm-modal {
  position: fixed;
  inset: 0;
  z-index: 31;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lm-modal[hidden],
.lm-modal-backdrop[hidden] {
  display: none !important;
}

.lm-modal-card {
  width: min(560px, 100%);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--lm-line);
  background: #ffffff;
  box-shadow: 0 26px 60px rgba(18, 20, 38, 0.16);
}

.lm-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lm-modal-head h2 {
  margin: 4px 0 6px;
  font-size: 1.4rem;
}

.lm-modal-head p {
  margin: 0;
  color: var(--lm-muted);
}

.lm-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--lm-line);
  background: #ffffff;
  color: #1a1b2f;
  font-size: 1.2rem;
  cursor: pointer;
}

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

.mu-form-section-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.lm-form-field {
  display: grid;
  gap: 8px;
}

.lm-form-field span {
  color: var(--lm-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.lm-form-field:first-child,
.lm-form-field:nth-child(2),
.lm-form-field:nth-child(3) {
  grid-column: 1 / -1;
}

.lm-delete-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #f8f9fc;
}

.mu-page-title {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.mu-page-heading > h1 {
  margin: 0;
}

.mu-cadastros-tabs {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(191, 201, 224, 0.72);
}

.mu-cadastros-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  color: #55617b;
  font-size: 0.96rem;
  font-weight: 600;
  background: transparent;
  transition: color 0.18s ease;
}

.mu-cadastros-tab:hover {
  color: #00b3ad;
}

.mu-cadastros-tab.is-active {
  color: #00b3ad;
}

.mu-cadastros-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: #00b3ad;
}

.mu-page-title-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mu-page-title-bar h1 {
  margin: 0;
  color: #00b3ad;
  flex-shrink: 0;
}

.mu-title-separator {
  width: 1px;
  height: 28px;
  background: rgba(17, 18, 33, 0.14);
  flex-shrink: 0;
}

.mu-title-search {
  width: min(360px, 42vw);
  min-width: 240px;
}

.mu-title-search .lm-input-shell {
  min-height: 46px;
  border-radius: 14px;
}

.mu-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--lm-line);
  border-radius: 14px;
  background: #ffffff;
  color: #7a8094;
  box-shadow: 0 6px 18px rgba(18, 24, 67, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mu-filter-toggle:hover,
.mu-filter-toggle.is-active {
  color: #00b3ad;
  border-color: rgba(0, 179, 173, 0.26);
  background: rgba(0, 179, 173, 0.06);
  box-shadow: 0 10px 20px rgba(0, 179, 173, 0.08);
}

.mu-filter-toggle svg {
  width: 18px;
  height: 18px;
}

.mu-page-heading p {
  margin: 10px 0 0;
  color: var(--lm-muted);
  font-size: 0.98rem;
}

.mu-page-heading p:empty {
  display: none;
}

.mu-users-surface {
  display: grid;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  gap: 18px;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.mu-users-surface .lm-users-area {
  display: block;
  align-self: start;
  width: 100%;
  height: auto !important;
  margin: 0;
  padding: 0;
  overflow: visible;
  min-height: 0;
}

.mu-cadastros-empty {
  display: grid;
}

.mu-cadastros-empty-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  align-content: center;
  justify-items: start;
  padding: 28px 30px;
  border: 1px solid rgba(191, 201, 224, 0.7);
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 20px 44px rgba(24, 34, 74, 0.08);
}

.mu-cadastros-empty-card strong {
  color: #1f2958;
  font-size: 1.15rem;
  font-weight: 700;
}

.mu-cadastros-empty-card p {
  margin: 0;
  color: #66748d;
}

.mu-users-surface .lm-users-table-wrap {
  display: block;
  align-self: start;
  height: auto;
  min-height: 0;
  max-height: min(56vh, calc(100dvh - 440px));
  overflow: auto;
}

.mu-users-surface .lm-users-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.mu-horizontal-filters {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 24px;
}

.mu-horizontal-filters[hidden] {
  display: none !important;
}

.mu-dropdown-filter {
  position: relative;
  min-width: 240px;
}

.mu-dropdown-filter-label {
  display: block;
  margin-bottom: 8px;
  color: var(--lm-text);
  font-size: 0.88rem;
  font-weight: 600;
}

.mu-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--lm-line);
  border-radius: 14px;
  background: #ffffff;
  color: #5d6881;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mu-dropdown-trigger:hover,
.mu-dropdown-trigger.is-open {
  border-color: rgba(0, 179, 173, 0.24);
  color: var(--lm-text);
  box-shadow: 0 10px 20px rgba(18, 24, 67, 0.06);
}

.mu-dropdown-trigger svg {
  width: 18px;
  height: 18px;
  color: #8c93a9;
  flex-shrink: 0;
}

.mu-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 12;
  display: grid;
  gap: 6px;
  min-width: 100%;
  padding: 10px;
  border: 1px solid var(--lm-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(18, 24, 67, 0.12);
}

.mu-dropdown-menu[hidden] {
  display: none !important;
}

.mu-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(191, 201, 224, 0.5);
  margin-bottom: 2px;
}

.mu-dropdown-link {
  border: 0;
  background: transparent;
  color: #0b7d79;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.mu-dropdown-link:hover {
  color: #086a67;
}

.mu-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--lm-text);
  cursor: pointer;
}

.mu-dropdown-option:hover {
  background: rgba(0, 179, 173, 0.05);
}

.mu-dropdown-option.is-disabled {
  color: #a3aac2;
  cursor: default;
}

.mu-dropdown-option.is-disabled:hover {
  background: transparent;
}

.mu-dropdown-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #00b3ad;
}

.mu-dropdown-option input:disabled {
  cursor: default;
  opacity: 0.45;
}

.mu-dropdown-option span {
  font-size: 0.92rem;
  font-weight: 500;
}

.mu-dropdown-empty {
  padding: 8px 10px;
  color: var(--lm-muted);
  font-size: 0.9rem;
}

.mu-create-fab {
  position: fixed;
  right: 32px;
  bottom: 28px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #00b3ad;
  color: #ffffff;
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(0, 179, 173, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.mu-create-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(0, 179, 173, 0.32);
}

.mu-create-fab span {
  transform: translateY(-1px);
}

.mu-create-fab:disabled {
  opacity: 0.6;
  cursor: wait;
}

.mu-feedback {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--lm-line);
  background: #f8fbfd;
  color: #405572;
  font-size: 0.94rem;
  font-weight: 600;
}

.mu-feedback[hidden] {
  display: none !important;
}

.mu-feedback.is-error {
  border-color: rgba(255, 51, 70, 0.24);
  background: rgba(255, 51, 70, 0.08);
  color: #b62536;
}

.mu-feedback.is-success {
  border-color: rgba(24, 201, 100, 0.2);
  background: rgba(24, 201, 100, 0.08);
  color: #0f8d49;
}

.mu-feedback.is-info {
  border-color: rgba(0, 179, 173, 0.18);
  background: rgba(0, 179, 173, 0.08);
  color: #0b7d79;
}

.mu-users-footer {
  display: flex;
  align-items: center;
  align-self: start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 0;
  padding-top: 0;
  color: var(--lm-muted);
  font-size: 0.92rem;
}

.mu-users-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mu-users-pagination[hidden] {
  display: none !important;
}

.mu-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--lm-line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--lm-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mu-page-btn:hover:not(:disabled),
.mu-page-btn.is-active {
  border-color: rgba(0, 179, 173, 0.24);
  background: rgba(0, 179, 173, 0.08);
  color: #0b7d79;
  box-shadow: 0 10px 20px rgba(0, 179, 173, 0.08);
}

.mu-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.lm-users-empty-row td {
  padding: 0;
  border-bottom: 0;
}

.mu-password-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  color: var(--lm-muted);
  font-size: 0.92rem;
}

.mu-password-note strong {
  color: var(--lm-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.mu-inline-text {
  color: var(--lm-muted);
  font-size: 0.9rem;
}

.mu-table-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mu-table-stack strong,
.mu-table-stack span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mu-table-stack .is-primary {
  color: var(--lm-text);
  font-weight: 600;
}

.mu-portal-pills {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.mu-portal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 179, 173, 0.1);
  color: #0b7d79;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.mu-modal-kicker {
  margin: 0;
  color: var(--lm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mu-modal-card {
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  padding: 28px;
  border-radius: 28px;
  box-shadow: 0 30px 72px rgba(18, 20, 38, 0.14);
  overflow: auto;
  overscroll-behavior: contain;
}

.mu-modal-card-wide {
  width: min(980px, calc(100vw - 48px));
}

.mu-modal-head-copy {
  display: grid;
  gap: 6px;
}

.mu-form-grid {
  gap: 18px;
}

.mu-form-grid + .lm-modal-actions {
  margin-top: 12px;
}

.mu-form-section {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px 18px 18px;
  border: 1px solid rgba(18, 24, 67, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(0, 179, 173, 0.03) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.mu-form-section-head {
  position: absolute;
  top: -14px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  background: #ffffff;
}

.mu-form-section-head h3 {
  margin: 0;
  color: var(--lm-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.mu-form-section-head p {
  display: none;
}

.mu-form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mu-form-section-grid-partner {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mu-form-section-grid .lm-form-field {
  grid-column: auto;
}

.mu-span-2 {
  grid-column: span 2;
}

.mu-span-3 {
  grid-column: span 3;
}

.mu-span-4 {
  grid-column: span 4;
}

.mu-portal-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(18, 24, 67, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(0, 179, 173, 0.03) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.mu-portal-field legend {
  padding: 0 6px;
  color: var(--lm-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.mu-portal-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mu-portal-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--lm-line);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
}

.mu-portal-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.mu-portal-option span {
  color: var(--lm-text);
  font-size: 0.92rem;
  font-weight: 500;
}

.mu-btn-primary-soft {
  border-color: rgba(0, 179, 173, 0.18);
  background: rgba(0, 179, 173, 0.12);
  color: #087d79;
  box-shadow: 0 10px 24px rgba(0, 179, 173, 0.12);
}

.mu-btn-primary-soft:hover {
  background: rgba(0, 179, 173, 0.16);
  border-color: rgba(0, 179, 173, 0.28);
}

.mu-partners-table th,
.mu-partners-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.mu-partners-table .lm-table-user {
  gap: 10px;
}

.mu-partners-table .lm-avatar {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.mu-partners-table td:nth-child(2),
.mu-partners-table td:nth-child(3),
.mu-partners-table td:nth-child(4),
.mu-partners-table td:nth-child(5) {
  white-space: nowrap;
}

.mu-departments-table td:nth-child(2) {
  white-space: nowrap;
}

@media (max-width: 1260px) {
  .lm-dashboard {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .lm-stats,
  .lm-users-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mu-users-surface .lm-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .lm-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .lm-topbar-controls {
    justify-content: flex-start;
  }

  .mu-title-search {
    width: min(300px, 40vw);
  }
}

@media (max-width: 920px) {
  .lm-dashboard {
    grid-template-columns: 1fr;
  }

  .lm-sidebar {
    gap: 18px;
    padding: 20px;
  }

  .lm-sidebar-footer {
    margin-top: 0;
  }

  .lm-main-panel {
    padding: 18px;
  }

  .lm-stats,
  .lm-users-grid,
  .lm-form-grid,
  .mu-portal-checks,
  .mu-form-section-grid {
    grid-template-columns: 1fr;
  }

  .mu-form-section-grid-partner {
    grid-template-columns: 1fr;
  }

  .mu-span-2,
  .mu-span-3,
  .mu-span-4 {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .lm-main-panel {
    padding: 14px;
  }

  .lm-shell {
    padding-bottom: 28px;
  }

  .lm-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .mu-page-title {
    flex-direction: column;
    align-items: stretch;
  }

  .lm-page-actions {
    width: 100%;
  }

  .lm-page-actions .lm-btn {
    flex: 1 1 0;
  }

  .lm-topbar-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lm-filter-group,
  .lm-view-block,
  .mu-toolbar-search {
    min-width: 0;
  }

  .mu-toolbar-grid {
    grid-template-columns: 1fr;
  }

  .mu-page-title {
    gap: 14px;
  }

  .mu-page-title-bar {
    align-items: flex-start;
  }

  .mu-cadastros-tabs {
    gap: 20px;
  }

  .mu-modal-card {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 22px;
    border-radius: 24px;
  }

  .mu-title-search {
    width: 100%;
    min-width: 0;
  }

  .mu-page-title-bar h1 {
    width: 100%;
  }

  .mu-horizontal-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .mu-dropdown-filter {
    min-width: 0;
  }

  .mu-create-fab {
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
  }

  .mu-users-surface .lm-users-area,
  .mu-users-surface .lm-users-table-wrap {
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .mu-users-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .lm-card-actions {
    grid-template-columns: 1fr 44px;
  }

  .lm-modal {
    padding: 14px;
  }
}
