.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 96px;
  text-align: center;
}

.topbar-actions {
  display: none !important;
}

.brand-nav {
  grid-column: 2;
  justify-content: center;
  max-width: min(860px, 100%);
}

.brand-nav > div {
  min-width: 0;
  text-align: left;
}

.brand-logo-sm {
  width: clamp(220px, 24vw, 360px);
  height: 76px;
  border-radius: 0;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-login .brand-logo-lg {
  width: clamp(220px, min(48vw, 44vh), 430px);
  height: auto;
  max-width: 100%;
  max-height: min(380px, 42vh);
  object-fit: contain;
  mix-blend-mode: normal;
}

.auth-landing {
  width: min(720px, calc(100vw - clamp(24px, 6vw, 64px)));
}

@media (max-height: 720px) and (min-width: 641px) {
  .brand-login .brand-logo-lg {
    width: clamp(190px, min(34vw, 34vh), 320px);
    max-height: 34vh;
  }
}

.app-nav-link.app-nav-logout {
  background: linear-gradient(180deg, #d84f71 0%, #b83a5f 100%);
  border-color: rgba(255, 220, 230, 0.78);
  color: #fff;
}

.app-nav-link.app-nav-logout:hover {
  background: linear-gradient(180deg, #e45d7e 0%, #a92f54 100%);
  border-color: rgba(255, 240, 244, 0.95);
  color: #fff;
}

.import-working-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d8c5f0;
  border-radius: 12px;
  background: #f6f0ff;
  color: #352052;
  font-weight: 700;
}

.import-working-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(58, 29, 99, 0.22);
  border-top-color: #3a1d63;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: importWorkingSpin .8s linear infinite;
}

@keyframes importWorkingSpin {
  to { transform: rotate(360deg); }
}

.guided-grid-wrap {
  border: 1px solid #dac9ee;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.guided-grid-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.guided-grid-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 150px)) repeat(3, auto);
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.guided-grid-tools label {
  display: grid;
  gap: 4px;
  font-weight: 800;
  color: #352052;
}

.guided-grid-tools label span {
  font-size: 12px;
}

.guided-grid-tools input {
  min-width: 0;
  padding: 8px;
}

.guided-grid-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.guided-grid-table th,
.guided-grid-table td {
  border: 1px solid #d8cdea;
  padding: 7px;
  vertical-align: middle;
}

.guided-grid-table thead th {
  background: #f3edf8;
  color: #211733;
  font-weight: 800;
  text-align: center;
}

.guided-grid-table tbody th {
  width: 72px;
  background: #faf7fd;
  text-align: center;
}

.guided-grid-table tbody th span {
  display: block;
  font-weight: 800;
}

.guided-grid-table tbody th small {
  display: block;
  color: #6e5b87;
  font-size: 11px;
  line-height: 1.2;
}

.guided-grid-table input,
.guided-grid-table select {
  width: 100%;
  min-width: 105px;
  padding: 8px;
  text-align: center;
  text-transform: uppercase;
}

.guided-grid-table .guided-grid-time-cell {
  width: 104px;
}

.guided-grid-table .guided-grid-time-cell input {
  min-width: 86px;
  font-size: 13px;
}

.import-help-box {
  margin-top: 12px;
  border: 1px solid #d8cdea;
  border-radius: 12px;
  background: #faf7fd;
  padding: 12px 14px;
}

.import-help-box strong {
  display: block;
  margin-bottom: 6px;
  color: #211733;
}

.import-help-box ol {
  margin: 0;
  padding-left: 20px;
}

.import-help-box li {
  margin: 4px 0;
}

.site-settings-layout {
  width: min(1500px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
}

.site-settings-layout .panel {
  width: 100%;
}

@media (max-width: 640px) {
  .topbar {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 82px;
  }

  .brand-nav {
    width: auto;
    max-width: min(100%, calc(100vw - 92px));
  }

  .brand-logo-sm {
    width: clamp(150px, 52vw, 230px);
    height: 60px;
  }

  .topbar-actions {
    display: none !important;
  }

  .brand-login .brand-logo-lg {
    width: min(230px, 68vw);
    max-width: 100%;
    height: auto;
    max-height: 220px;
  }

  .auth-body {
    align-items: center;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
  }

  .auth-landing {
    width: min(430px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    margin-left: auto;
    margin-right: auto;
  }

  .auth-brand-panel,
  .auth-action-panel {
    min-width: 0;
  }

  .site-settings-layout {
    width: 100%;
  }

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