:root {
  --app-font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --app-text: #172033;
  --app-muted: #667085;
  --app-blue: #2563eb;
  --app-blue-soft: rgba(66, 133, 244, 0.14);
  --app-border: rgba(148, 163, 184, 0.28);
  --app-border-radius: 7px;
  --app-round-radius: 999px;
  --bs-border-radius: var(--app-border-radius);
  --bs-border-radius-sm: var(--app-border-radius);
  --bs-border-radius-lg: var(--app-border-radius);
  --bs-border-radius-xl: var(--app-border-radius);
  --bs-border-radius-xxl: var(--app-border-radius);
  --bs-border-radius-pill: var(--app-round-radius);
  --app-surface: rgba(255, 255, 255, 0.72);
  --app-shadow: 0 22px 58px rgba(28, 43, 71, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  position: relative;
  min-height: 100%;
  font-size: 15px;
}

body,
button,
input,
textarea,
select {
  font-family: var(--app-font);
  font-size: 1rem;
  letter-spacing: 0;
}

body {
  color: var(--app-text);
}

.container {
  width: min(calc(100% - 32px), 1140px);
  margin-right: auto;
  margin-left: auto;
}

.navbar,
.navbar > .container,
.navbar-collapse,
.navbar-nav {
  display: flex;
  align-items: center;
}

.navbar > .container {
  flex-wrap: wrap;
}

.navbar-brand,
.nav-link {
  text-decoration: none;
}

.navbar-brand {
  margin-right: 16px;
}

.navbar-collapse {
  flex-grow: 1;
}

.navbar-nav {
  flex-direction: row;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav:last-child {
  margin-left: auto;
}

.navbar-toggler {
  display: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(66, 133, 244, 0.32);
}

.app-body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(66, 133, 244, 0.16), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #f2f6fb 48%, #ffffff 100%);
}

.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 78%);
}

.app-orb {
  position: fixed;
  z-index: 0;
  border-radius: var(--app-round-radius);
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.52;
}

.app-orb-primary {
  top: 9%;
  left: 10%;
  width: 280px;
  height: 280px;
  background: rgba(66, 133, 244, 0.24);
}

.app-orb-secondary {
  right: 7%;
  bottom: 12%;
  width: 280px;
  height: 280px;
  background: rgba(52, 199, 89, 0.16);
}

.app-navbar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(28, 43, 71, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

.app-navbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.34), rgba(20, 184, 166, 0.24), transparent);
}

.navbar-brand {
  color: #111827;
  font-size: 1.02rem;
  font-weight: 720;
}

.navbar-light .navbar-nav .nav-link {
  color: #475467;
  font-size: 0.95rem;
  font-weight: 590;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--app-blue);
}

.app-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 2px;
  padding: 8px 12px !important;
  border-radius: var(--app-round-radius);
}

.app-nav-link::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 3px;
  left: 14px;
  height: 2px;
  border-radius: var(--app-round-radius);
  background: linear-gradient(90deg, rgba(66, 133, 244, 0), rgba(66, 133, 244, 0.58), rgba(20, 184, 166, 0.34), rgba(20, 184, 166, 0));
  opacity: 0;
  transform: scaleX(0.72);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-button-spinner {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--app-round-radius);
  vertical-align: -0.12em;
  animation: app-spin 720ms linear infinite;
}

button.is-loading,
input.is-loading {
  cursor: wait;
  opacity: 0.78;
}

.app-toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  --toast-accent: #4285f4;
  --toast-accent-soft: rgba(66, 133, 244, 0.13);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 13px 12px 13px 13px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--app-border-radius);
  color: #111827;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 50px rgba(28, 43, 71, 0.18),
    0 2px 8px rgba(28, 43, 71, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  pointer-events: auto;
  animation: app-toast-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.app-toast::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: var(--app-round-radius);
  background: var(--toast-accent);
}

.app-toast-message {
  margin: 0;
  color: #172033;
  font-size: 0.91rem;
  font-weight: 650;
  line-height: 1.35;
}

.app-toast-success {
  --toast-accent: #10b981;
  --toast-accent-soft: rgba(16, 185, 129, 0.14);
}

.app-toast-error {
  --toast-accent: #ef4444;
  --toast-accent-soft: rgba(239, 68, 68, 0.14);
}

.app-toast-warning {
  --toast-accent: #f59e0b;
  --toast-accent-soft: rgba(245, 158, 11, 0.16);
}

.app-toast-info,
.app-toast-loading {
  --toast-accent: #4285f4;
  --toast-accent-soft: rgba(66, 133, 244, 0.14);
}

.app-toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--app-round-radius);
  color: var(--toast-accent);
  background: linear-gradient(180deg, var(--toast-accent-soft), rgba(255, 255, 255, 0.54));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.app-toast-spinner {
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--app-round-radius);
  animation: app-spin 720ms linear infinite;
}

.app-toast-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: var(--app-round-radius);
  color: #667085;
  background: transparent;
  transition: color 160ms ease, background-color 160ms ease;
}

.app-toast-close:hover,
.app-toast-close:focus {
  color: #172033;
  background: rgba(15, 23, 42, 0.06);
}

.app-toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--toast-accent), rgba(20, 184, 166, 0.72));
  transform-origin: left;
  animation: app-toast-progress var(--toast-duration, 4200ms) linear both;
}

.app-toast-persistent .app-toast-progress {
  display: none;
}

.app-toast.is-leaving {
  animation: app-toast-out 180ms ease both;
}

@keyframes app-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes app-toast-out {
  to {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }
}

@keyframes app-toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (prefers-color-scheme: dark) {
  .app-toast {
    border-color: rgba(71, 85, 105, 0.72);
    color: #f8fafc;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88)),
      rgba(15, 23, 42, 0.9);
    box-shadow:
      0 22px 58px rgba(0, 0, 0, 0.28),
      0 2px 10px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .app-toast-message {
    color: #f8fafc;
  }

  .app-toast-close {
    color: #cbd5e1;
  }

  .app-toast-close:hover,
  .app-toast-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }
}

.app-nav-link i {
  width: 16px;
  color: #718096;
  font-size: 0.9rem;
  text-align: center;
  transition: color 160ms ease, transform 160ms ease;
}

.app-nav-link:hover,
.app-nav-link:focus {
  background: rgba(23, 32, 51, 0.035);
  transform: translateY(-1px);
}

.app-nav-link:hover::after,
.app-nav-link:focus::after,
.app-nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.app-nav-link:hover i,
.app-nav-link:focus i,
.app-nav-link.active i {
  color: var(--app-blue);
}

.navbar-light .navbar-nav .app-nav-link.active {
  color: #1d4ed8;
  background: transparent;
  box-shadow: none;
}

.app-nav-dropdown {
  overflow: hidden;
  min-width: 170px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(28, 43, 71, 0.12);
}

.app-nav-dropdown .dropdown-item {
  border-radius: var(--app-border-radius);
  color: #475467;
  font-size: 0.92rem;
  font-weight: 650;
}

.app-nav-dropdown .dropdown-item:hover,
.app-nav-dropdown .dropdown-item:focus {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.1);
}

.app-profile-menu {
  position: relative;
}

.app-profile-trigger {
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0 !important;
  border: 0;
  border-radius: var(--app-border-radius);
  background: transparent;
}

.app-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1050;
  visibility: hidden;
  overflow: visible;
  display: block;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.app-profile-dropdown::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 9px;
}

.app-profile-menu:hover .app-profile-dropdown,
.app-profile-menu:focus-within .app-profile-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.app-profile-action {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  text-align: left;
}

.app-profile-action i {
  width: 17px;
  color: #667085;
  text-align: center;
}

.app-profile-action:hover i,
.app-profile-action:focus i {
  color: #2563eb;
}

.app-nav-logout {
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--app-border-radius);
}

.app-logout-form {
  margin: 0;
}

.app-logout-form button {
  border: 0;
  background: transparent;
}

.app-container {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}

.app-main {
  padding-top: 8px;
}

.app-main > h4,
.app-main h4 {
  color: #111827;
  font-size: 1.4rem;
  font-weight: 760;
  letter-spacing: 0;
}

.app-main h5 {
  color: #1f2937;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}

.table,
.form-control,
.alert,
.list-group-item {
  color: var(--app-text);
  font-size: 0.96rem;
}

.table {
  overflow: hidden;
  border-color: var(--app-border);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(28, 43, 71, 0.08);
}

.table thead th {
  border-bottom-color: rgba(148, 163, 184, 0.32);
  color: #334155;
  background: rgba(248, 251, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 720;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(248, 251, 255, 0.62);
}

.list-group-item {
  border-color: var(--app-border);
  background: var(--app-surface);
  font-weight: 620;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.clients-page {
  width: min(100%, 1120px);
  margin: 24px auto 56px;
}

.clients-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.clients-header p {
  margin: 0 0 4px;
  color: #667085;
  font-size: 0.82rem;
  font-weight: 660;
}

.clients-header h4 {
  margin: 0;
  color: #111827;
  font-size: 1.55rem;
  font-weight: 760;
}

.clients-header > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-round-radius);
  color: #475467;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
  font-weight: 650;
  backdrop-filter: blur(12px);
}

.clients-filter-bar {
  --clients-filter-control-height: 44px;
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 34px rgba(28, 43, 71, 0.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.clients-filter-bar .form-control,
.clients-filter-bar .form-select,
.clients-filter-bar button,
.clients-filter-bar .clients-filter-clear {
  height: var(--clients-filter-control-height);
  min-height: var(--clients-filter-control-height);
}

.clients-search-field {
  position: relative;
  min-width: 0;
}

.clients-filter-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.clients-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
}

.clients-filter-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding-top: 2px;
}

.clients-sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.clients-sort-field {
  position: relative;
}

.clients-sort-field .form-select {
  width: 210px;
  border-color: rgba(148, 163, 184, 0.3);
  background-color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 650;
}

.clients-sort-direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: var(--app-border-radius);
  color: #344054;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.clients-sort-direction:hover {
  border-color: rgba(59, 130, 246, 0.48);
  color: #2563eb;
  background: rgba(239, 246, 255, 0.9);
  transform: translateY(-1px);
}

.clients-filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: var(--app-border-radius);
  color: #667085;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}

.clients-filter-clear:hover {
  color: #b42318;
  background: rgba(254, 243, 242, 0.86);
}

.clients-search-field i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  color: #94a3b8;
  transform: translateY(-50%);
}

.clients-search-field .form-control {
  padding-left: 42px;
}

.clients-table-card,
.client-register-card {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(28, 43, 71, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}

.clients-table-card {
  overflow: hidden;
}

.clients-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.clients-table thead th {
  padding: 17px 24px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  color: #344054;
  background: rgba(248, 251, 255, 0.78);
  font-size: 0.83rem;
  font-weight: 760;
}

.clients-table tbody td {
  padding: 18px 24px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.4);
}

.clients-table-card:not(.clients-card-mode) > .table-responsive > .clients-table thead th {
  padding: 12px 20px;
  font-size: 0.76rem;
}

.clients-table-card:not(.clients-card-mode) > .table-responsive > .clients-table tbody td {
  padding: 11px 20px;
}

.clients-table tbody tr {
  transition: background-color 160ms ease, transform 160ms ease;
}

.clients-table tbody tr:hover td {
  background: rgba(248, 251, 255, 0.86);
}

.clients-table tbody tr:last-child td {
  border-bottom: 0;
}

.client-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.client-avatar {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--app-border-radius);
  color: #1d4ed8;
  background: linear-gradient(180deg, #ffffff, #edf5ff);
  box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.14), 0 8px 20px rgba(66, 133, 244, 0.12);
  font-size: 0.92rem;
  font-weight: 760;
}

.client-identity strong {
  display: block;
  color: #1f2937;
  font-size: 0.98rem;
  font-weight: 720;
}

.client-identity small {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 0.8rem;
  font-weight: 520;
}

.clients-table-card:not(.clients-card-mode) .client-identity {
  gap: 10px;
}

.clients-table-card:not(.clients-card-mode) .client-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.84rem;
}

.clients-table-card:not(.clients-card-mode) .client-identity small {
  color: #7a8699;
  font-size: 0.7rem;
  font-weight: 520;
  line-height: 1.25;
}

.clients-table-card:not(.clients-card-mode) .license-key {
  padding: 4px 7px;
  font-size: 0.74rem;
}

.license-key {
  display: inline-flex;
  max-width: 260px;
  padding: 5px 8px;
  border-radius: var(--app-border-radius);
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copyable-value {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: var(--app-border-radius);
  padding: 2px;
  cursor: copy;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.copyable-value:hover,
.copyable-value:focus {
  background: rgba(66, 133, 244, 0.07);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.08);
  outline: 0;
}

.copyable-value.copy-success {
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  animation: copy-pulse 520ms ease;
}

.copyable-value-wide {
  width: 100%;
}

.client-action.client-action-errors {
  position: relative;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.09);
}

.client-action.client-action-errors .client-action-error-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: var(--app-round-radius);
  padding: 0 4px;
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.28);
  font-size: 0.65rem;
  font-weight: 850;
  line-height: 1;
}

.client-action-info {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.client-action-info:hover,
.client-action-info:focus {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.14);
}

.error-log-modal[hidden] {
  display: none;
}

.error-log-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-log-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.error-log-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.error-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.error-log-header small {
  color: #64748b;
  font-weight: 760;
}

.error-log-header h5 {
  margin: 2px 0 0;
  color: #111827;
  font-weight: 800;
}

.error-log-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 20px 24px 24px;
}

.hardware-id-dialog {
  width: min(560px, 100%);
}

.hardware-id-body {
  gap: 12px;
}

.hardware-id-value {
  display: block;
  overflow-wrap: anywhere;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--app-border-radius);
  color: #1f2937;
  background: rgba(248, 251, 255, 0.92);
  font-size: 0.92rem;
  line-height: 1.55;
}

.error-log-item {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-border-radius);
  padding: 16px;
  background: rgba(248, 251, 255, 0.82);
}

.error-log-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.error-log-item-head strong {
  color: #1f2937;
}

.error-log-item-head span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 650;
}

.error-log-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.client-action.error-log-copy {
  width: 30px;
  height: 30px;
  border-radius: var(--app-border-radius);
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.client-action.error-log-copy:hover,
.client-action.error-log-copy:focus {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.15);
}

.client-action.error-log-copy.copy-success {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.error-log-item p {
  margin: 0 0 12px;
  color: #334155;
}

.error-log-item pre {
  max-height: 240px;
  margin: 8px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--app-border-radius);
  padding: 12px;
  color: #1f2937;
  background: rgba(226, 232, 240, 0.72);
}

.error-log-item summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 760;
}

.error-log-extra strong {
  color: #475569;
  font-size: 0.86rem;
}

.license-key-large {
  max-width: 100%;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.82rem;
}

.license-key-actions {
  display: grid;
  grid-template-columns: 96px 38px;
  gap: 6px;
  align-items: center;
}

.client-key-save {
  height: 40px;
  min-height: 40px;
  padding-right: 14px;
  padding-left: 14px;
}

.machine-count,
.license-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--app-round-radius);
  font-size: 0.8rem;
  font-weight: 720;
}

.machine-count {
  color: #475467;
  background: rgba(15, 23, 42, 0.05);
}

.license-status-active {
  --status-color: #10b981;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
}

.license-status-blocked {
  --status-color: #f59e0b;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
}

.license-status-expired {
  --status-color: #ef4444;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
}

.license-status-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: var(--app-round-radius);
  background: var(--status-color, #94a3b8);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color, #94a3b8) 40%, transparent);
}

.license-status-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1px solid var(--status-color, #94a3b8);
  opacity: 0;
  animation: status-pulse 1.4s ease-out infinite;
}

@keyframes status-pulse {
  0% {
    transform: scale(0.65);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.clients-table-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.clients-table-title h5,
.clients-table-title p {
  margin: 0;
}

.clients-table-title p {
  margin-top: 3px;
  color: #667085;
  font-size: 0.84rem;
  font-weight: 590;
}

.license-summary-grid {
  display: grid;
  grid-template-columns: 205px 118px 74px;
  max-width: 430px;
  gap: 10px;
  align-items: end;
}

.license-summary-grid label {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 660;
}

.client-license-row {
  display: grid;
  grid-template-columns: 190px 170px 108px 92px 186px;
  gap: 12px;
  align-items: end;
}

.client-license-row > * {
  min-width: 0;
}

.client-license-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 660;
}

.client-license-row .form-control,
.client-license-row .license-calendar-trigger,
.client-license-row .license-key-large,
.client-license-row .client-action {
  min-height: 40px;
}

.client-license-row .form-control {
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.client-license-row .text-danger {
  display: block;
  min-height: 0;
  margin-top: 3px;
  font-size: 0.72rem;
}

.license-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0 !important;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.56);
  color: #475467;
  font-size: 0.88rem !important;
  font-weight: 650 !important;
}

.license-calendar {
  position: relative;
}

.license-calendar-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  color: #1f2937;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 560;
  text-align: left;
}

.license-calendar-trigger span {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.2;
}

.license-calendar-trigger i {
  color: #3b82f6;
  font-size: 0.84rem;
}

.license-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 2160;
  display: none;
  width: min(292px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-border-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94)),
    #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  transform: none;
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  overflow: hidden;
}

.client-register-row .license-calendar-popover {
  right: 0;
  left: auto;
}

.license-calendar.open .license-calendar-popover {
  display: block;
}

.license-calendar-popover.portal-open {
  position: fixed;
  z-index: 2147483000;
  display: block;
}

body.license-calendar-open {
  overflow-x: hidden;
}

.license-calendar-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 9px;
}

.license-calendar-presets button,
.license-calendar-head button,
.license-calendar-day {
  border: 0;
  background: transparent;
}

.license-calendar-presets button {
  min-height: 28px;
  padding: 0 6px;
  border-radius: var(--app-border-radius);
  color: #475467;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.72rem;
  font-weight: 740;
}

.license-calendar-presets button:hover,
.license-calendar-presets button:focus,
.license-calendar-presets button.active {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.13);
}

.license-calendar-head {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.license-calendar-head strong {
  color: #172033;
  font-size: 0.88rem;
  font-weight: 760;
  text-align: center;
}

.license-calendar-head button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--app-border-radius);
  color: #64748b;
}

.license-calendar-head button:hover,
.license-calendar-head button:focus {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.1);
}

.license-calendar-weekdays,
.license-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.license-calendar-weekdays {
  margin-bottom: 4px;
}

.license-calendar-weekdays span {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 760;
  text-align: center;
}

.license-calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  height: 29px;
  place-items: center;
  border-radius: var(--app-border-radius);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 690;
}

.license-calendar-day:hover,
.license-calendar-day:focus {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.1);
}

.license-calendar-day.muted {
  color: #b8c0cc;
}

.license-calendar-day.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.54;
}

.license-calendar-day.today {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.44);
}

.license-calendar-day.in-range {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.1);
}

.license-calendar-day.selected {
  color: #ffffff;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.client-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.client-actions form {
  margin: 0;
}

.client-action {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: var(--app-border-radius);
  background: transparent;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.client-machines-guide .client-actions,
.client-machines-list .client-actions {
  justify-content: center;
  gap: 4px;
}

.client-machines-guide .client-action,
.client-machines-list .client-action {
  width: 32px;
  height: 32px;
  border-radius: var(--app-border-radius);
}

.client-machines-guide .client-action-errors,
.client-machines-list .client-action-errors {
  min-width: 32px;
  padding: 0;
}

.client-machines-guide .clients-table tbody td:first-child,
.client-machines-guide .clients-table tbody td:last-child,
.client-machines-list .clients-table tbody td:first-child,
.client-machines-list .clients-table tbody td:last-child {
  vertical-align: middle;
}

.machine-status-column,
.machine-status-cell {
  width: 34px;
  min-width: 34px;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center;
}

.machine-status-cell .license-status-dot {
  display: inline-block;
  vertical-align: middle;
}

.machine-actions-column {
  min-width: 190px;
}

.machine-actions-column span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--app-round-radius);
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.client-action:hover,
.client-action:focus {
  transform: translateY(-1px);
}

.client-action-edit {
  color: #d99b16;
}

.client-action-edit:hover,
.client-action-edit:focus {
  color: #b7791f;
  background: rgba(245, 158, 11, 0.1);
}

.client-action-renew {
  color: #2563eb;
}

.client-action-renew:hover,
.client-action-renew:focus {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}

.client-action-activate {
  color: #059669;
}

.client-action-activate:hover,
.client-action-activate:focus {
  color: #047857;
  background: rgba(16, 185, 129, 0.11);
}

.client-action-deactivate {
  color: #64748b;
}

.client-action-deactivate:hover,
.client-action-deactivate:focus {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.client-renew-action {
  position: relative;
}

.client-renew-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 30;
  display: none;
  min-width: 136px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(28, 43, 71, 0.14);
}

.client-renew-action.open .client-renew-menu {
  display: grid;
  gap: 4px;
}

.client-renew-menu.portal-open {
  position: fixed;
  z-index: 2147483000;
  display: grid;
  gap: 4px;
}

.client-renew-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--app-border-radius);
  color: #334155;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 680;
  text-align: left;
}

.client-renew-menu button:hover,
.client-renew-menu button:focus {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}

.client-action-delete {
  color: #dc2626;
}

.client-action-delete:hover,
.client-action-delete:focus {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.09);
}

.clients-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 38px 20px;
  color: #667085;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.clients-empty i {
  color: #94a3b8;
  font-size: 1.5rem;
}

.clients-empty p {
  margin: 0;
  font-weight: 590;
}

.clients-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.42);
}

.clients-pagination p {
  margin: 0;
  color: #667085;
  font-size: 0.88rem;
  font-weight: 620;
}

.clients-pagination nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.page-number,
.page-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--app-border-radius);
  color: #667085;
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.page-step {
  min-width: auto;
}

.page-number:hover,
.page-step:hover,
.page-number:focus,
.page-step:focus {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.08);
  transform: translateY(-1px);
}

.page-number.active {
  color: #ffffff;
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.28);
}

.page-step.disabled {
  color: #a0a8b5;
  cursor: default;
}

.client-register-card {
  margin-top: 22px;
  padding: 22px;
}

.client-register-card-quick {
  margin-bottom: 18px;
}

.client-edit-page {
  width: min(100%, 1320px);
  margin-top: 14px;
}

.client-edit-header {
  align-items: center;
  margin-bottom: 12px;
}

.client-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.client-edit-header h4 {
  margin: 0;
  font-size: 1.35rem;
}

.client-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.license-toggle-header {
  min-height: 28px;
  gap: 5px;
  padding: 0 8px;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.18);
  font-size: 0.76rem !important;
  border-radius: var(--app-round-radius);
}

.license-toggle-header input {
  width: 14px;
  height: 14px;
}

.client-edit-card {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 14px;
  overflow: visible;
}

.client-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.client-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.license-toggle-toolbar {
  min-height: 42px;
  padding: 0 12px;
  background: rgba(239, 246, 255, 0.72);
}

.client-edit-toolbar h5,
.client-edit-toolbar p {
  margin: 0;
}

.client-edit-toolbar h5 {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 760;
}

.client-edit-toolbar p {
  margin-top: 2px;
  color: #667085;
  font-size: 0.84rem;
}

.client-register-card h5 {
  margin: 0 0 14px;
}

.client-register-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr) minmax(130px, 0.35fr) minmax(150px, 0.45fr) auto;
  gap: 10px;
  align-items: start;
}

.client-register-row > *,
.license-summary-grid > * {
  min-width: 0;
}

.client-register-row-two {
  grid-template-columns: 220px 170px;
  max-width: 410px;
}

.client-phone-input {
  max-width: 170px;
}

.client-machine-limit-input {
  width: 56px;
  max-width: 56px;
  text-align: center;
}

.machine-device-cell,
.machine-last-access-cell {
  white-space: nowrap;
}

.machine-device-cell {
  min-width: 230px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-last-access-cell {
  min-width: 145px;
}

.client-machines-guide .clients-table,
.client-machines-list .clients-table {
  min-width: 1040px;
}

.client-edit-sections {
  display: grid;
  gap: 12px;
}

.client-edit-section {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.client-edit-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.client-section-heading {
  margin-bottom: 8px;
}

.client-section-heading h5 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  font-weight: 760;
}

.client-section-subtitle {
  margin: 10px 0 6px;
  color: #667085;
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-quick-section {
  order: 1;
}

.client-config-section {
  position: relative;
  z-index: 4;
  order: 2;
  overflow: visible;
}

.client-machines-section {
  order: 3;
}

.client-config-section .config-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.client-config-section .config-section {
  overflow: visible;
  padding: 14px;
}

.client-config-section .config-section-dropdown {
  padding: 0;
  overflow: hidden;
}

.client-config-section .config-section-primary {
  position: relative;
  z-index: 6;
  overflow: visible;
  grid-column: 1 / -1;
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.68));
}

.client-config-section .config-section-primary .config-section-grid {
  grid-template-columns: minmax(340px, 1fr) minmax(150px, auto);
  align-items: end;
}

.client-config-section .config-section-primary .config-field-titulojanela {
  grid-column: 1 / -1;
  grid-row: 1;
}

.client-config-section .config-section-primary .config-field-complementotitulojanela {
  grid-column: 1 / -1;
  grid-row: 2;
}

.client-config-section .config-section-primary .config-field-titulojanela .form-control,
.client-config-section .config-section-primary .config-field-complementotitulojanela .form-control {
  border-radius: var(--app-border-radius);
}

.client-config-section .config-section-primary .config-field-modelosupgrade {
  position: relative;
  z-index: 8;
  grid-column: 1;
  grid-row: 3;
  max-width: 190px;
}

.client-config-section .config-section-primary .config-field-modelosupgrade .config-multiselect-panel {
  left: 0;
  right: auto;
}

.client-config-section .config-section-primary .config-field-logsativo {
  grid-column: 2;
  grid-row: 3;
}

.client-config-section .config-section:not(.config-section-primary) .config-section-grid {
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
}

.client-config-section .config-section-primary .config-field-wide {
  grid-column: 1 / -1;
}

.client-config-section .config-section-compact {
  padding: 10px 12px;
}

.client-config-section .config-section-compact .config-section-grid {
  gap: 0;
}

.client-config-section .config-section-heading {
  margin-bottom: 10px;
}

.config-dropdown > summary {
  list-style: none;
}

.config-dropdown > summary::-webkit-details-marker {
  display: none;
}

.config-dropdown-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
}

.config-dropdown-summary strong,
.config-dropdown-summary small {
  display: block;
}

.config-dropdown-summary strong {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 780;
}

.config-dropdown-summary small {
  margin-top: 1px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 560;
}

.config-dropdown-summary i {
  color: #64748b;
  font-size: 0.82rem;
  transition: transform 160ms ease;
}

.config-dropdown[open] .config-dropdown-summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.config-dropdown[open] .config-dropdown-summary i {
  transform: rotate(180deg);
}

.config-dropdown-content {
  padding: 14px;
}

.client-config-section .config-section-toggleable {
  padding: 0;
}

.client-config-section .config-section-toggleable .config-preset-toggle {
  min-height: 46px;
  padding: 0 14px;
}

.client-config-section .config-section-toggleable .config-toggle-content {
  padding: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.client-machines-section:not(:has(tbody tr)) .table-responsive {
  display: none;
}

.client-machines-section:not(:has(tbody tr)) .clients-empty {
  padding: 14px 18px;
  border-top: 0;
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.48);
}

.client-bottom-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.client-machines-guide,
.client-machines-list {
  margin-top: 18px;
}

.client-machines-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.client-machines-list-head h5,
.client-machines-list-head p {
  margin: 0;
}

.client-machines-list-head h5 {
  color: #111827;
  font-size: 1rem;
  font-weight: 760;
}

.client-machines-list-head p {
  margin-top: 2px;
  color: #667085;
  font-size: 0.84rem;
  font-weight: 590;
}

.client-machines-guide > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.client-machines-guide > summary::-webkit-details-marker {
  display: none;
}

.client-machines-guide > summary strong,
.client-machines-guide > summary small {
  display: block;
}

.client-machines-guide > summary strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 760;
}

.client-machines-guide > summary small {
  margin-top: 2px;
  color: #667085;
  font-size: 0.84rem;
  font-weight: 590;
}

.client-machines-guide > summary i {
  color: #64748b;
  transition: transform 160ms ease;
}

.client-machines-guide[open] > summary {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.client-machines-guide[open] > summary i {
  transform: rotate(180deg);
}

.machine-add-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(160px, 0.75fr) minmax(180px, 1fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.machine-add-form label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 660;
}

.machine-add-form .btn {
  min-height: 44px;
  white-space: nowrap;
}

.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding-left: 0;
  border-bottom-color: rgba(148, 163, 184, 0.24);
  list-style: none;
}

.client-tabs .nav-link {
  border: 0;
  border-radius: var(--app-border-radius) var(--app-border-radius) 0 0;
  color: #667085;
  font-size: 0.9rem;
  font-weight: 680;
}

.client-tabs .nav-link:hover,
.client-tabs .nav-link:focus {
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.08);
}

.client-tabs .nav-link.active {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -2px 0 #3b82f6;
}

.client-tab-content {
  padding-top: 20px;
}

.client-tab-title {
  padding: 0 0 14px;
  border-bottom: 0;
}

@media (max-width: 1199.98px) {
  .license-summary-grid {
    grid-template-columns: 205px 118px 74px;
  }

  .client-license-row {
    grid-template-columns: 190px 170px 108px 56px 222px;
  }

  .license-toggle {
    justify-content: center;
  }
}

@media (max-width: 991.98px) {
  .clients-page {
    margin-top: 16px;
  }

  .client-register-card {
    padding: 18px;
  }

  .license-summary-grid {
    grid-template-columns: 205px 118px 74px;
  }

  .client-license-row {
    grid-template-columns: 190px 170px 108px;
  }

  .client-config-section .config-section-primary .config-field-titulojanela,
  .client-config-section .config-section-primary .config-field-complementotitulojanela {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .client-config-section .config-section-primary .config-field-modelosupgrade,
  .client-config-section .config-section-primary .config-field-logsativo {
    grid-column: auto;
    grid-row: auto;
  }

  .client-config-section .config-fields {
    grid-template-columns: 1fr;
  }

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

  .machine-add-form .btn {
    grid-column: 1 / -1;
  }

  .clients-table {
    min-width: 820px;
  }
}

@media (max-width: 767.98px) {
  .clients-page {
    margin-top: 16px;
  }

  .clients-header {
    align-items: start;
    flex-direction: column;
  }

  .client-edit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-edit-toolbar .btn,
  .client-bottom-actions .btn {
    width: 100%;
  }

  .client-bottom-actions {
    justify-content: stretch;
  }

  .machine-add-form {
    grid-template-columns: 1fr;
  }

  .clients-filter-bar {
    padding: 12px;
  }

  .clients-filter-search-row {
    grid-template-columns: 1fr;
  }

  .clients-search-submit {
    width: 100%;
  }

  .clients-filter-options-row {
    align-items: stretch;
    flex-direction: column;
  }

  .clients-sort-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .clients-sort-field {
    flex: 1 1 180px;
  }

  .clients-sort-field .form-select {
    width: 100%;
  }

  .clients-filter-clear {
    align-self: flex-start;
  }

  .clients-table thead th,
  .clients-table tbody td {
    padding: 15px 16px;
  }

  .client-identity small {
    display: none;
  }

  .client-register-row {
    grid-template-columns: 1fr;
  }

  .client-license-row {
    grid-template-columns: 1fr;
  }

  .license-summary-grid {
    grid-template-columns: 1fr;
  }

  .license-summary-grid > :first-child {
    grid-column: auto;
  }

  .client-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-tabs .nav-item,
  .client-tabs .nav-link {
    width: 100%;
  }

  .client-tabs .nav-link {
    min-height: 44px;
    border-radius: var(--app-border-radius);
    text-align: center;
  }

  .client-register-row .btn {
    width: 100%;
  }

  .clients-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .clients-pagination nav {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .container {
    width: min(calc(100% - 24px), 1140px);
  }

  .app-navbar {
    padding: 10px 0;
  }

  .navbar > .container {
    justify-content: space-between;
  }

  .navbar-toggler {
    display: inline-grid;
    width: 42px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: var(--app-border-radius);
    background: rgba(255, 255, 255, 0.72);
  }

  .navbar-toggler-icon {
    display: block;
    width: 20px;
    height: 14px;
    border-top: 2px solid #475467;
    border-bottom: 2px solid #475467;
    box-shadow: inset 0 5px 0 -3px #475467;
  }

  .navbar-collapse {
    display: none;
    flex-basis: 100%;
    padding-top: 10px;
  }

  .navbar-collapse.show {
    display: block;
  }

  .navbar-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .navbar-nav:last-child {
    margin-left: 0;
  }

  .app-nav-link {
    display: flex;
    width: 100%;
  }

  .clients-header .btn {
    width: 100%;
  }

  .client-register-card {
    padding: 14px;
    border-radius: var(--app-border-radius);
  }

  .client-tabs {
    grid-template-columns: 1fr;
  }

  .app-toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

.form-control {
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-control:focus {
  border-color: #4285f4;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.13), 0 10px 30px rgba(66, 133, 244, 0.08);
}

.form-group label {
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 650;
}

.config-editor {
  white-space: nowrap;
  overflow-x: auto;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

.config-fields {
  display: grid;
  gap: 16px;
}

.config-section {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.66);
}

.config-section-heading {
  margin-bottom: 14px;
}

.config-section-heading h5,
.config-section-heading p {
  margin: 0;
}

.config-section-heading h5,
.client-section-heading h5,
.config-dropdown-summary strong,
.config-field label,
.config-toggle-field span,
.client-machines-guide summary strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.client-machines-list-head h5,
.client-machines-list-head p,
.client-machines-list .machine-actions-column span {
  align-items: center;
  gap: 7px;
}

.client-machines-list-head h5,
.client-machines-list-head p {
  display: inline-flex;
}

.client-machines-list .clients-table thead th {
  white-space: nowrap;
}

.client-machines-list .clients-table thead th .field-label-icon {
  margin-right: 7px;
  vertical-align: -0.08em;
}

.client-machines-list .machine-actions-column span {
  display: inline-flex;
}

.field-label-icon {
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 0.88em;
}

.config-section-heading p {
  margin-top: 3px;
  color: #667085;
  font-size: 0.82rem;
}

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

.config-section-toggleable {
  display: grid;
  gap: 14px;
}

.config-preset-toggle {
  display: flex;
  align-items: center;
}

.config-preset-toggle .config-toggle-field {
  flex-direction: row-reverse;
  gap: 7px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.config-toggle-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.config-toggle-content[hidden] {
  display: none;
}

.config-subsection {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--app-border-radius);
  background: rgba(248, 251, 255, 0.68);
}

.config-toggle-content .config-subsection-stacked {
  grid-column: 1 / -1;
}

.config-subsection-stacked .config-section-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.config-toggle-content .config-section-grid {
  grid-template-columns: minmax(0, 1fr);
}

.config-subsection-heading {
  margin-bottom: 12px;
}

.config-subsection-heading h6 {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 800;
}

.config-field {
  min-width: 0;
}

.config-field-wide {
  grid-column: 1 / -1;
}

.config-field-compact {
  max-width: 190px;
}

.config-field label {
  margin-bottom: 7px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 650;
}

.config-field small {
  display: block;
  margin-top: 6px;
  color: #667085;
}

.config-host-tags {
  display: grid;
  gap: 12px;
}

.config-host-tags-entry {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.config-host-tags-input {
  flex: 1 1 auto;
  min-width: 0;
}

.config-host-tags-add {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 116px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--app-border-radius);
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.config-host-tags-add:hover,
.config-host-tags-add:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  color: #1e40af;
  background: rgba(219, 234, 254, 0.95);
}

.config-host-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-border-radius);
  background: rgba(248, 251, 255, 0.62);
}

.config-host-tags-empty {
  color: #94a3b8;
  font-size: 0.84rem;
}

.config-host-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 32px;
  padding: 3px 5px 3px 11px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--app-round-radius);
  color: #1e3a8a;
  background: rgba(239, 246, 255, 0.96);
  font-size: 0.84rem;
  font-weight: 680;
}

.config-host-tag-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-host-tag-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--app-round-radius);
  color: #64748b;
  background: transparent;
  font-size: 0.7rem;
}

.config-host-tag-action:hover,
.config-host-tag-action:focus-visible {
  color: #1d4ed8;
  background: rgba(147, 197, 253, 0.32);
}

.config-host-tag-remove:hover,
.config-host-tag-remove:focus-visible {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.8);
}

.config-field .form-select,
.config-field .form-control {
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  background-color: rgba(255, 255, 255, 0.9);
}

.language-select {
  position: relative;
}

.language-select-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  text-align: left;
}

.language-select-trigger:hover,
.language-select.open .language-select-trigger,
.language-select-trigger:focus-visible {
  border-color: rgba(37, 99, 235, 0.48);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.language-select-trigger img,
.language-select-menu img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  object-fit: contain;
}

.language-select-trigger span {
  flex: 1 1 auto;
}

.language-select-trigger > i {
  color: #64748b;
  font-size: 0.76rem;
  transition: transform 160ms ease;
}

.language-select.open .language-select-trigger > i {
  transform: rotate(180deg);
}

.language-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 20;
  display: none;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.language-select.open .language-select-menu {
  display: grid;
  gap: 3px;
}

.language-select-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--app-border-radius);
  color: #334155;
  background: transparent;
  font: inherit;
  text-align: left;
}

.language-select-menu button:hover,
.language-select-menu button.active {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.95);
}

.config-password-field {
  position: relative;
}

.config-password-field .form-control {
  padding-right: 44px;
}

.config-password-field .form-control:invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.16rem rgba(220, 53, 69, 0.14);
}

.config-password-field .form-control:valid {
  border-color: #198754;
}

.config-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--app-border-radius);
  color: #64748b;
  background: transparent;
  transform: translateY(-50%);
}

.config-password-toggle:hover,
.config-password-toggle:focus {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.config-multiple {
  min-height: 142px !important;
}

.config-toggle-field {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--app-border-radius);
  color: #334155;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
}

/* Preset is always enabled internally; its legacy checkbox is not a user
   control because the section itself is opened/closed as a dropdown. */
.config-preset-dropdown > .config-toggle-field[hidden] {
  display: none !important;
}

.config-toggle-field input {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
}

.config-multiselect {
  position: relative;
  z-index: 1;
}

.config-multiselect.open {
  z-index: 2140;
}

.config-multiselect-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  font: inherit;
}

.config-multiselect-button span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.config-multiselect-button i {
  color: #64748b;
  font-size: 0.82rem;
  transition: transform 160ms ease;
}

.config-multiselect.open .config-multiselect-button {
  border-color: #4285f4;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.13), 0 10px 30px rgba(66, 133, 244, 0.08);
}

.config-multiselect.open .config-multiselect-button i {
  transform: rotate(180deg);
}

.config-multiselect-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 2141;
  display: none;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 7px;
  width: min(520px, calc(100vw - 40px));
  max-height: 230px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(28, 43, 71, 0.14);
}

.config-multiselect.open .config-multiselect-panel {
  display: grid;
}

.config-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.config-checkbox {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  margin: 0 !important;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--app-border-radius);
  color: #334155;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-size: 0.84rem;
}

.config-checkbox:hover {
  border-color: rgba(66, 133, 244, 0.42);
  background: rgba(66, 133, 244, 0.06);
}

.config-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.config-checkbox-all {
  color: #1d4ed8;
  font-weight: 760 !important;
}

@media (max-width: 575.98px) {
  .config-section {
    padding: 14px;
  }

  .config-section-grid {
    grid-template-columns: 1fr;
  }

  .config-toggle-content {
    grid-template-columns: 1fr;
  }

  .config-host-tags-entry {
    flex-direction: column;
  }

  .config-host-tags-add {
    width: 100%;
  }

  .config-field-wide {
    grid-column: auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--app-border-radius);
  font-size: 0.93rem;
  font-weight: 660;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

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

.btn-primary,
.btn-success {
  border-color: transparent;
  background: linear-gradient(180deg, #4c8df7 0%, #2563eb 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  border-color: rgba(71, 84, 103, 0.1);
  background: #475467;
}

.btn-danger {
  border-color: transparent;
  background: linear-gradient(180deg, #ef6666 0%, #dc2626 100%);
}

.btn-outline-secondary {
  border-color: rgba(71, 84, 103, 0.28);
  color: #475467;
  background: rgba(255, 255, 255, 0.64);
}

.app-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #667085;
  background: rgba(255, 255, 255, 0.55);
  line-height: 60px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.app-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.2), rgba(20, 184, 166, 0.14), transparent);
}

.login-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: #172033;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(66, 133, 244, 0.16), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #f2f6fb 48%, #ffffff 100%);
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 18px;
  isolation: isolate;
}

.login-orb {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: var(--app-round-radius);
  filter: blur(22px);
  opacity: 0.52;
}

.login-orb-primary {
  top: 9%;
  left: 10%;
  background: rgba(66, 133, 244, 0.24);
}

.login-orb-secondary {
  right: 11%;
  bottom: 12%;
  background: rgba(52, 199, 89, 0.16);
}

.login-panel {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--app-border-radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 70px rgba(28, 43, 71, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(1.25);
  animation: login-card-in 520ms ease both;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  color: #3b4658;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.login-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--app-border-radius);
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.16);
}

.login-brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading p {
  margin: 0 0 7px;
  color: #5f6c80;
  font-size: 0.92rem;
  font-weight: 520;
}

.login-heading h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 7vw, 2.55rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 17px;
}

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

.login-field label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 650;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap::before {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #718096;
  font-size: 1rem;
  line-height: 1;
}

.login-input-user::before {
  content: "@";
  font-weight: 700;
}

.login-input-password::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: var(--app-round-radius);
  box-shadow: inset 0 -5px 0 -3px currentColor;
}

.login-input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: var(--app-border-radius);
  outline: none;
  color: #121826;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 0.98rem;
  font-weight: 500;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.login-input-wrap input::placeholder {
  color: #95a0af;
  font-weight: 460;
}

.login-input-wrap input:hover {
  border-color: rgba(66, 133, 244, 0.48);
  background: rgba(255, 255, 255, 0.95);
}

.login-input-wrap input:focus {
  border-color: #4285f4;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.13), 0 10px 30px rgba(66, 133, 244, 0.08);
  transform: translateY(-1px);
}

.login-validation {
  min-height: 18px;
  color: #c2413f;
  font-size: 0.78rem;
  font-weight: 560;
}

.login-validation-summary {
  min-height: 0;
  text-align: center;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin-top: 3px;
  border: 0;
  border-radius: var(--app-border-radius);
  color: #ffffff;
  background: linear-gradient(180deg, #4c8df7 0%, #2563eb 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  font-size: 0.98rem;
  font-weight: 720;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.login-submit:hover {
  filter: brightness(1.03);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.24);
}

.login-submit:focus-visible {
  outline: 4px solid rgba(66, 133, 244, 0.18);
  outline-offset: 3px;
}

.login-footnote {
  margin: 24px 0 0;
  color: #69778b;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes copy-pulse {
  50% {
    transform: translateY(-1px) scale(1.01);
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 24px 14px;
  }

  .login-panel {
    padding: 26px 20px;
    border-radius: var(--app-border-radius);
  }

  .login-brand {
    margin-bottom: 26px;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 14px;
  }

  .container,
  .client-edit-page {
    width: min(calc(100% - 20px), 1140px);
  }

  .clients-page,
  .client-edit-page {
    margin-top: 10px;
  }

  .client-edit-page {
    padding-bottom: 78px;
  }

  .clients-header,
  .client-edit-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .client-edit-header {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }

  .client-edit-header .btn {
    width: auto;
    min-height: 40px;
    padding: 0 12px;
  }

  .clients-header h4,
  .client-edit-header h4 {
    font-size: 1.28rem;
    line-height: 1.18;
  }

  .clients-header > span {
    min-height: 30px;
    padding: 0 10px;
  }

  .client-register-card,
  .clients-table-card {
    border-radius: var(--app-border-radius);
  }

  .client-register-card {
    padding: 14px;
  }

  .client-edit-card {
    padding: 12px;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .client-edit-toolbar {
    gap: 10px;
  }

  .client-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .client-toolbar-actions .btn {
    display: none;
  }

  .license-toggle-toolbar {
    width: 100%;
    justify-content: center;
  }

  .client-license-row,
  .client-register-row,
  .client-register-row-two,
  .machine-add-form,
  .client-config-section .config-section-primary .config-section-grid,
  .client-config-section .config-section:not(.config-section-primary) .config-section-grid,
  .client-config-section .config-section-compact .config-section-grid {
    grid-template-columns: 1fr !important;
    max-width: none;
  }

  .client-license-row {
    grid-template-columns: minmax(0, 1fr) 92px !important;
  }

  .client-license-row > :nth-child(1),
  .client-license-row > :nth-child(2),
  .client-license-row > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .client-license-row > :nth-child(3) {
    grid-column: 1;
  }

  .client-license-row > :nth-child(4) {
    grid-column: 2;
  }

  .client-phone-input,
  .client-machine-limit-input,
  .license-key-actions {
    width: 100%;
    max-width: none;
  }

  .license-key-actions {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .client-key-save {
    position: fixed;
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 1040;
    width: calc(100% - 20px);
    height: 40px;
    min-height: 40px;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
  }

  .client-config-section .config-section-primary .config-field-titulojanela {
    order: 1;
  }

  .client-config-section .config-section-primary .config-field-complementotitulojanela {
    order: 2;
  }

  .client-config-section .config-section-primary .config-field-modelosupgrade {
    order: 3;
    max-width: none;
  }

  .client-config-section .config-section-primary .config-field-logsativo {
    order: 4;
  }

  .client-license-row .form-control,
  .client-license-row .license-calendar-trigger,
  .client-license-row .license-key-large,
  .client-register-row .form-control,
  .client-register-row .license-calendar-trigger,
  .machine-add-form .form-control,
  .config-section .form-control,
  .config-multiselect-button {
    min-height: 44px;
  }

  .client-config-section .config-section {
    padding: 12px;
  }

  .config-dropdown-summary {
    min-height: 44px;
    padding: 0 12px;
  }

  .config-multiselect-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 12px;
    left: 10px;
    width: auto;
    max-height: min(70dvh, 430px);
    grid-template-columns: 1fr;
    z-index: 2147481500;
  }

  .license-calendar-popover {
    width: min(320px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }

  .clients-table-card .table-responsive,
  .client-machines-guide .table-responsive,
  .client-machines-list .table-responsive {
    overflow: visible;
  }

  .clients-table,
  .client-machines-guide .clients-table,
  .client-machines-list .clients-table {
    display: block;
    min-width: 0 !important;
  }

  .clients-table thead {
    display: none;
  }

  .clients-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .clients-table tbody tr {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--app-border-radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(28, 43, 71, 0.08);
  }

  .clients-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .clients-table tbody td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 760;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }

  .clients-table tbody td[data-label="Cliente"],
  .clients-table tbody td[data-label="Ações"] {
    align-items: flex-start;
  }

  .clients-table tbody td[data-label="Cliente"]::before,
  .clients-table tbody td[data-label="Ações"]::before {
    padding-top: 8px;
  }

  .clients-table tbody td[data-label="Ações"] {
    flex-direction: column;
    gap: 8px;
  }

  .clients-table tbody td[data-label="Ações"]::before {
    align-self: flex-start;
  }

  .clients-table tbody td[data-label="Ações"] .client-actions {
    align-self: stretch;
    justify-content: flex-start;
  }

  .client-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .client-action {
    width: 32px;
    height: 32px;
    border-radius: var(--app-border-radius);
  }

  .client-machines-guide .clients-table tbody tr,
  .client-machines-list .clients-table tbody tr {
    padding-left: 36px;
  }

  .client-machines-guide .machine-status-cell,
  .client-machines-list .machine-status-cell {
    position: absolute;
    top: 18px;
    left: 14px;
    display: block;
    width: auto;
    min-width: 0;
    padding: 0 !important;
  }

  .client-machines-guide .machine-status-cell::before,
  .client-machines-list .machine-status-cell::before {
    content: none;
  }

  .machine-device-cell,
  .machine-last-access-cell {
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .copyable-value,
  .license-key {
    max-width: 100%;
  }

  .license-key {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .client-identity {
    min-width: 0;
  }

  .client-identity strong,
  .client-identity small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .clients-pagination {
    padding: 14px;
  }

  .client-edit-page {
    padding-bottom: 78px;
  }

  .client-bottom-actions {
    position: fixed !important;
    right: 10px !important;
    bottom: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    z-index: 2147481200;
    display: flex !important;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--app-border-radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
  }

  .client-bottom-actions .btn {
    width: 100%;
    min-height: 42px;
    border-radius: var(--app-border-radius);
  }

  .app-footer {
    position: static !important;
    z-index: auto !important;
    min-height: auto;
    margin-top: 18px;
    padding: 14px 0 72px;
    line-height: 1.35;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 420px) {
  .container,
  .client-edit-page {
    width: min(calc(100% - 16px), 1140px);
  }

  .client-register-card,
  .clients-table-card {
    border-radius: var(--app-border-radius);
  }

  .clients-table tbody {
    padding: 10px;
  }

  .clients-table tbody tr {
    padding: 12px;
  }

  .client-machines-guide .clients-table tbody tr,
  .client-machines-list .clients-table tbody tr {
    padding-left: 32px;
  }

  .client-machines-guide .machine-status-cell,
  .client-machines-list .machine-status-cell {
    left: 12px;
  }

  .client-title-row {
    gap: 8px;
  }

  .license-toggle-header {
    min-height: 32px;
    padding: 0 9px;
  }

  .client-avatar {
    width: 34px;
    height: 34px;
  }
}

/* Client collection view switcher and infinite-scroll state. */
.clients-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  padding: 0 12px;
  border: 1px solid rgba(59, 130, 246, 0.34);
  border-radius: var(--app-border-radius);
  background: rgba(239, 246, 255, 0.88);
  color: #2563eb;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.clients-view-toggle:hover {
  border-color: rgba(37, 99, 235, 0.62);
  background: rgba(219, 234, 254, 0.96);
  transform: translateY(-1px);
}
.clients-infinite-sentinel {
  display: flex;
  justify-content: center;
  padding: 18px;
  color: var(--text-muted, #64748b);
  font-size: .86rem;
}
.clients-infinite-sentinel.loading { opacity: .65; }

.clients-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--app-border-radius);
  color: #475467;
  background: rgba(255, 255, 255, 0.7);
  font-size: .8rem;
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.clients-load-more:hover:not(:disabled),
.clients-load-more:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  color: #2563eb;
  background: rgba(239, 246, 255, 0.9);
}

.clients-load-more:disabled {
  cursor: wait;
}

.clients-table-card.clients-card-mode .table-responsive { overflow: visible; }
.clients-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}
.clients-card-grid[hidden] { display: none; }
.client-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  min-width: 0;
  padding: 18px 16px 16px;
  border: 1px solid var(--border-color, #dbe4ef);
  border-radius: var(--app-border-radius);
  background: var(--surface-color, #fff);
  box-shadow: 0 8px 20px rgba(30, 65, 110, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.client-card:hover {
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 12px 26px rgba(30, 65, 110, .15);
  transform: translateY(-2px);
}
.client-card-field { min-width: 0; }
.client-card-field::before {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted, #64748b);
  content: attr(data-label);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}
.client-card-field[data-label="Ações"] .client-actions { justify-content: flex-start; }
.client-card-field[data-label="Cliente"] { grid-column: 1 / -1; }
.client-card-field[data-label="Ações"] { grid-column: 1 / -1; }
.client-card-field[data-label="Chave"],
.client-card-field[data-label="Máquinas"],
.client-card-field[data-label="Expiração"],
.client-card-field[data-label="Status"] { flex: 1 1 0; }
.client-card-actions {
  position: absolute;
  top: -13px;
  right: 12px;
  z-index: 2;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.client-card-actions::before { display: none; }
.client-card-actions .client-actions { gap: 5px; }
.client-card-actions .client-action-edit { display: none; }
.client-card-actions .client-action {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 520px) {
  .client-card { grid-template-columns: 1fr; }
  .client-card-field[data-label="Chave"],
  .client-card-field[data-label="Máquinas"],
  .client-card-field[data-label="Expiração"],
  .client-card-field[data-label="Status"] { grid-column: 1; }
}
.clients-table-card.clients-card-mode .clients-table { display: block; }
.clients-table-card.clients-card-mode .clients-table thead { display: none; }
.clients-table-card.clients-card-mode .clients-table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}
.clients-table-card.clients-card-mode .clients-table tbody tr {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-color, #dbe4ef);
  border-radius: var(--app-border-radius);
  box-shadow: 0 8px 20px rgba(30, 65, 110, .08);
  background: var(--surface-color, #fff);
}
.clients-table-card.clients-card-mode .clients-table tbody td {
  display: block;
  border: 0;
  padding: 0;
  text-align: left !important;
}
.clients-table-card.clients-card-mode .clients-table tbody td::before {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted, #64748b);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Cliente"]::before { content: "Cliente"; }
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Chave"]::before { content: "Chave de ativação"; }
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Máquinas"]::before { content: "Máquinas"; }
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Expiração"]::before { content: "Expiração"; }
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Status"]::before { content: "Status"; }
.clients-table-card.clients-card-mode .clients-table tbody td[data-label="Ações"]::before { content: "Ações"; }
