body {
  min-height: 100vh;
  background: #f5f7fb;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 60px;
  padding: 0 12px;
  color: #fff;
  background: #2f67df;
  border-top: 7px solid #a9d34d;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-brand:hover {
  color: #fff;
}

.topbar-brand strong {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-link:hover,
.topbar-link:focus,
.topbar-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  text-decoration: none;
}

.topbar .dropdown-menu {
  border: 0;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.topbar .dropdown-divider {
  border-top-color: rgba(15, 23, 42, 0.12);
}

.topbar-user {
  margin-left: auto;
}

.topbar-user form {
  margin: 0;
}

.topbar-avatar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-avatar-button:hover,
.topbar-avatar-button:focus,
.topbar-user.show .topbar-avatar-button {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.topbar-avatar {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.topbar-dropdown-item {
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
}

.topbar-dropdown-item:hover,
.topbar-dropdown-item:focus {
  color: #1f2937;
  background: #e9ecef;
}

.topbar-dropdown-item.active {
  color: #1f2937;
  background: #fff;
}

.topbar-dropdown-button {
  width: 100%;
  text-align: left;
}

.app-main {
  padding: 28px 32px;
}

.auth-main {
  display: grid;
  min-height: 100vh;
  align-items: start;
  justify-items: center;
  padding: 78px 24px 24px;
  background: #e9eef4;
}

.auth-card {
  width: min(420px, 100%);
}

.login-shell {
  width: min(404px, 100%);
}

.login-card {
  min-height: 390px;
  padding: 31px 34px 15px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: #08172c;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
}

.login-title strong {
  color: #2563eb;
  font-weight: 800;
}

.login-message {
  min-height: 20px;
  margin: 0 0 15px;
  text-align: center;
  color: #071426;
  font-size: 14px;
}

.login-message.is-alert {
  color: #b42318;
}

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

.login-field {
  display: grid;
  gap: 2px;
  color: #40566f;
  font-size: 14px;
}

.login-input {
  width: 100%;
  height: 49px;
  border: 1px solid #d3dce8;
  border-radius: 6px;
  background-color: #fff;
  color: #071426;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 19px;
  border: 0;
  border-radius: 6px;
  background: #1abc91;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(26, 188, 145, 0.14);
}

.login-button:hover,
.login-button:focus {
  background: #16a77f;
}

.login-powered {
  margin: 21px 0 0;
  text-align: right;
  color: #071426;
  font-size: 12px;
}

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

.search-toolbar {
  margin: -8px 0 18px;
}

.search-field {
  display: grid;
  gap: 6px;
  width: min(480px, 100%);
  color: #40566f;
  font-size: 14px;
  font-weight: 650;
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.field-row.no-reveal {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
}

.field-row input,
.field-row textarea {
  background: #f8f9fa;
}

.field-row textarea {
  min-height: 72px;
}

.input-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.input-copy.secret-copy {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.input-copy textarea {
  min-height: 92px;
}

.autocomplete-shell {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.autocomplete-option {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #172033;
  text-align: left;
  font: inherit;
}

.autocomplete-option:hover,
.autocomplete-option:focus {
  background: #eef5ff;
  outline: none;
}

.autocomplete-empty {
  padding: 10px 12px;
  color: #6c757d;
  font-size: 14px;
}

.reveal-password-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 38px;
  padding-inline: 10px;
}

.reveal-password-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.reveal-password-button .reveal-icon-hidden {
  display: none;
}

.reveal-password-button[aria-pressed="true"] .reveal-icon-visible {
  display: none;
}

.reveal-password-button[aria-pressed="true"] .reveal-icon-hidden {
  display: inline-flex;
}

.copy-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 38px;
  padding-inline: 10px;
}

.copy-button svg {
  width: 25px;
  height: 25px;
}

.copy-button .copy-back,
.copy-button .copy-front,
.copy-button .copy-check {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-button .copy-back {
  opacity: 0.75;
}

.copy-button .copy-check {
  color: #6f42c1;
}

.copy-button.is-copied {
  color: #6f42c1;
  border-color: #6f42c1;
  background: #f4efff;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

input:not([type="submit"]),
select,
textarea {
  width: 100%;
}

@media (max-width: 880px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 8px 12px;
  }

  .app-main {
    padding: 20px;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
  }

  .topbar-user {
    margin-left: 0;
  }

  .page-header {
    display: grid;
  }

  .field-row,
  .field-row.no-reveal,
  .input-copy,
  .input-copy.secret-copy {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .login-shell {
    width: 100%;
  }

  .login-card {
    padding: 28px 22px 15px;
  }

  .login-title {
    font-size: 28px;
    gap: 7px;
  }

}
