.account-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.account-menu form {
  margin: 0;
}

.account-identity {
  display: grid;
  gap: 2px;
  max-width: 190px;
  line-height: 1.1;
}

.account-identity strong,
.account-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity strong {
  color: #12263a;
  font-size: 13px;
}

.account-identity small {
  color: #64748b;
  font-size: 11px;
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  background: #eef3f6;
  color: #12263a;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(18, 38, 58, 0.12);
}

.auth-logo {
  width: 190px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 28px;
}

.auth-panel h1 {
  margin: 6px 0 10px;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-panel > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: #526579;
}

.auth-alert,
.admin-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #e7a2a2;
  border-radius: 6px;
  background: #fff2f2;
  color: #8a2020;
  font-size: 13px;
}

.auth-alert svg {
  flex: 0 0 18px;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.admin-body {
  min-height: 100vh;
  margin: 0;
  background: #f3f6f8;
  color: #12263a;
}

.admin-back {
  margin-left: 16px;
}

.admin-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.admin-heading,
.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-heading {
  margin-bottom: 24px;
}

.admin-heading h1 {
  margin: 4px 0 6px;
  font-size: 30px;
  letter-spacing: 0;
}

.admin-heading p,
.admin-section-heading p {
  margin: 0;
  color: #617286;
}

.access-count {
  display: grid;
  min-width: 120px;
  text-align: right;
}

.access-count strong {
  font-size: 26px;
}

.access-count span {
  color: #617286;
  font-size: 12px;
}

.admin-message.success {
  border-color: #91c9ad;
  background: #edf9f2;
  color: #17633b;
}

.admin-section {
  padding: 22px 0 26px;
  border-top: 1px solid #cdd7df;
}

.admin-section-heading {
  margin-bottom: 18px;
}

.admin-section h2 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: 0;
}

.access-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(230px, 1.4fr) 150px auto auto;
  align-items: end;
  gap: 12px;
}

.access-form label {
  display: grid;
  gap: 6px;
  color: #465a6f;
  font-size: 12px;
  font-weight: 700;
}

.access-form input,
.access-form select {
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #b9c6d0;
  border-radius: 5px;
  background: #ffffff;
  color: #12263a;
  font: inherit;
  font-weight: 400;
}

.access-form .active-control {
  grid-template-columns: 18px auto;
  align-items: center;
  height: 40px;
  padding: 0 8px;
}

.access-form .active-control input {
  width: 16px;
  height: 16px;
}

.access-table-wrap {
  overflow: auto;
  border: 1px solid #c8d2db;
  border-radius: 6px;
  background: #ffffff;
}

.access-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.access-table th,
.access-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e1e7ec;
  text-align: left;
  vertical-align: middle;
}

.access-table th {
  background: #eef3f6;
  color: #526579;
  font-size: 11px;
  text-transform: uppercase;
}

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

.access-table td:first-child {
  display: grid;
  gap: 3px;
}

.access-table td:first-child span,
.config-path {
  color: #687b8e;
  font-size: 11px;
}

.access-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.access-status.active {
  background: #e5f5eb;
  color: #17633b;
}

.access-status.disabled {
  background: #eef1f4;
  color: #64748b;
}

.icon-button.danger {
  color: #a12828;
}

.empty-access {
  padding: 32px !important;
  color: #687b8e;
  text-align: center !important;
}

.config-path {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .status-strip,
  .account-identity {
    display: none;
  }

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

  .access-form .primary-button {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .auth-panel {
    padding: 24px;
  }

  .admin-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 22px;
  }

  .admin-heading {
    align-items: flex-start;
  }

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

  .admin-back span,
  .access-count {
    display: none;
  }
}
