body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.account-box {
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(246,249,255,.96) 100%);
  border: 1px solid rgba(217,226,240,.96);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(34,56,95,.08);
}

.account-box.empty {
  display: grid;
  gap: 10px;
}

.account-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b95a7;
}

.account-name {
  font-size: 15px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.3;
}

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.account-head-copy {
  min-width: 0;
}

.account-mini-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #dbe2ee;
  border-radius: 10px;
  background: #fff;
  color: #667085;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.account-mini-btn:hover {
  background: #f7f9fc;
}

.account-btn-grow {
  flex: 1 1 0;
}

.account-email {
  font-size: 13px;
  color: #667085;
  line-height: 1.4;
  word-break: break-word;
}

.account-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: #edf6ff;
  color: #2158c9;
  font-size: 12px;
  font-weight: 700;
}

.account-access.demo {
  background: #eefbf1;
  color: #1e8c4f;
}

.account-access.inactive {
  background: #fff3e8;
  color: #b65c14;
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.account-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.account-btn.primary {
  background: linear-gradient(180deg, #4d7cf0 0%, #396ce0 100%);
  color: #fff;
}

.account-btn.secondary {
  background: #fff;
  color: #1f2937;
  border: 1px solid #dbe2ee;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(10px);
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: min(100%, 460px);
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(230,235,243,.95);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(17,24,39,.22);
}

.auth-panel {
  padding: 28px;
}

.auth-panel-head.compact {
  margin-bottom: 18px;
}

.auth-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b95a7;
  margin-bottom: 10px;
}

.auth-panel-title {
  font-size: 28px;
  font-weight: 800;
  color: #101828;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 8px;
}

.auth-panel-subtitle {
  font-size: 14px;
  color: #667085;
  line-height: 1.5;
  margin: 0;
}

.auth-tabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #f2f5fa;
  margin-bottom: 14px;
}

.auth-tab-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #667085;
}

.auth-tab-btn.active {
  background: #fff;
  color: #101828;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}

.auth-message {
  min-height: 22px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.error { color: #b42318; }
.auth-message.success { color: #1d7f47; }

.auth-form-pane { display: none; }
.auth-form-pane.active { display: block; }

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 700;
  color: #344054;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-field input {
  width: 100%;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  font-size: 14px;
  color: #101828;
  background: #fff;
  outline: none;
}

.auth-field input:focus {
  border-color: #7ba2ff;
  box-shadow: 0 0 0 3px rgba(77,124,240,.12);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 92px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.password-toggle:hover {
  background: #f5f7fb;
}

.auth-link,
.auth-inline-link {
  border: none;
  background: transparent;
  color: #315fd2;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.auth-link:hover,
.auth-inline-link:hover {
  text-decoration: underline;
}

.auth-submit {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #4d7cf0 0%, #396ce0 100%);
  box-shadow: 0 12px 24px rgba(58,109,224,.22);
  margin-top: 4px;
}

.auth-submit[disabled] {
  opacity: .68;
  cursor: default;
}

.auth-help.compact {
  margin-top: 14px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.field-hint {
  min-height: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: #b42318;
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 22px 18px;
  }

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

  .auth-panel-title {
    font-size: 24px;
  }
}

.auth-checks {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #667085;
}

.auth-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.auth-check a {
  color: #315fd2;
  text-decoration: none;
}

.auth-check a:hover {
  text-decoration: underline;
}

.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7edf5;
  font-size: 12px;
  line-height: 1.45;
}

.auth-legal-links a {
  color: #667085;
  text-decoration: none;
}

.auth-legal-links a:hover {
  text-decoration: underline;
}

.source-note {
  font-size: 12px;
  line-height: 1.55;
  color: #8b95a7;
}

.source-note-page {
  margin-top: 18px;
  padding: 10px 2px 0;
}

body.account-modal-open {
  overflow: hidden;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.account-modal.hidden {
  display: none;
}

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

.account-modal-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(230,235,243,.95);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(17,24,39,.20);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.account-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-modal-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b95a7;
  margin-bottom: 4px;
}

.account-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #101828;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.account-modal-subtitle {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: #667085;
}

.account-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.account-modal-message {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.4;
}

.account-modal-message.error { color: #b42318; }
.account-modal-message.success { color: #1d7f47; }

.account-modal-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 12px;
}

.cabinet-section {
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,249,253,.98) 100%);
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.cabinet-section-wide {
  grid-column: 1 / -1;
}

.cabinet-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #101828;
  letter-spacing: -.02em;
}

.cabinet-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #344054;
  margin-bottom: 4px;
}

.cabinet-text,
.cabinet-hint,
.cabinet-empty,
.cabinet-muted {
  font-size: 12px;
  line-height: 1.45;
  color: #667085;
}

.cabinet-form {
  display: grid;
  gap: 10px;
}

.cabinet-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cabinet-field {
  display: grid;
  gap: 5px;
}

.cabinet-field label {
  font-size: 12px;
  font-weight: 700;
  color: #344054;
}

.cabinet-field input,
.cabinet-field textarea {
  width: 100%;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: #101828;
  background: #fff;
  outline: none;
}

.cabinet-field input[readonly] {
  color: #667085;
  background: #f8fafc;
}

.cabinet-field textarea {
  resize: vertical;
  min-height: 78px;
}

.cabinet-field input:focus,
.cabinet-field textarea:focus {
  border-color: #7ba2ff;
  box-shadow: 0 0 0 3px rgba(77,124,240,.12);
}

.cabinet-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cabinet-subsection {
  display: grid;
  gap: 6px;
}

.cabinet-cards {
  display: grid;
  gap: 8px;
}

.cabinet-cards.empty {
  padding: 10px 12px;
  border: 1px dashed #d8e1ef;
  border-radius: 14px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.cabinet-card {
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.cabinet-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #101828;
  line-height: 1.35;
}

.cabinet-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #667085;
}

.cabinet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.cabinet-pill.active,
.cabinet-pill.approved {
  background: #eefbf1;
  color: #1e8c4f;
}

.cabinet-pill.pending {
  background: #fff3e8;
  color: #b65c14;
}

.cabinet-pill.rejected,
.cabinet-pill.revoked,
.cabinet-pill.suspended,
.cabinet-pill.blocked {
  background: #fdeeee;
  color: #b42318;
}

.account-search-wrap {
  position: relative;
}

.account-lab-picker {
  position: relative;
}

.account-lab-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(170px, .9fr) minmax(150px, .8fr);
  gap: 10px;
}

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

.account-suggest-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(17,24,39,.12);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.account-suggest-list.hidden {
  display: none;
}

.account-suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2f7;
}

.account-suggest-item:last-child {
  border-bottom: none;
}

.account-suggest-item:hover {
  background: #f7faff;
}

.account-selected-lab-card {
  border: 1px dashed #d8e1ef;
  border-radius: 14px;
  padding: 10px 12px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  background: #fbfcfe;
}

.account-selected-lab-card.ready {
  border-style: solid;
  background: #fff;
  color: #101828;
}

.account-selected-lab-card.empty {
  color: #667085;
}

.account-selected-lab-title {
  font-size: 13px;
  font-weight: 800;
  color: #101828;
  line-height: 1.35;
  margin-bottom: 6px;
}

.account-selected-lab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

@media (max-width: 980px) {
  .account-lab-grid {
    grid-template-columns: 1fr;
  }

  .account-lab-field-wide {
    grid-column: auto;
  }

  .account-modal {
    padding: 12px;
  }

  .account-modal-dialog {
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .account-modal-grid,
  .cabinet-grid-2 {
    grid-template-columns: 1fr;
  }
}


/* compact cabinet tuning */
.cabinet-actions .account-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  box-shadow: none;
}

.account-lab-grid .cabinet-field input {
  min-height: 38px;
}

.account-modal-dialog::-webkit-scrollbar {
  width: 10px;
}

.account-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(152, 162, 179, .45);
  border-radius: 999px;
}

.auth-small-note {
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(248, 250, 252, .92);
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}


.email-verification-card {
  width: min(100%, 520px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 255, 0.98) 100%);
  border: 1px solid rgba(230, 236, 247, 0.98);
  box-shadow: 0 34px 95px rgba(15, 23, 42, 0.26);
}

.email-verification-panel {
  gap: 0;
  padding: 30px;
}

.email-verification-head {
  margin-bottom: 20px;
}

.email-verification-head .auth-panel-title {
  font-size: 27px;
  letter-spacing: -0.04em;
}

.email-verification-head .auth-panel-subtitle {
  max-width: 410px;
  color: #5f6f86;
}

.email-verification-box {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 12px;
  padding: 17px;
  border: 1px solid rgba(220, 228, 242, 0.95);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.email-verification-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(55, 103, 255, 0.1);
  color: #315fd2;
  font-size: 18px;
  font-weight: 850;
}

.email-verification-box-content {
  min-width: 0;
}

.email-verification-title {
  color: #758197;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.email-verification-address {
  color: #111827;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  word-break: break-word;
}

.email-verification-box-note {
  color: #65748a;
  font-size: 13px;
  line-height: 1.45;
}

.email-verification-steps-wrap {
  margin-top: 20px;
}

.email-verification-steps-title {
  margin-bottom: 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.email-verification-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.email-verification-step {
  min-height: 96px;
  padding: 13px 12px 12px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.email-verification-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 999px;
  background: rgba(55, 103, 255, 0.1);
  color: #315fd2;
  font-size: 12px;
  font-weight: 900;
}

.email-verification-step strong {
  display: block;
  color: #111827;
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 4px;
}

.email-verification-step em {
  display: block;
  color: #6b778b;
  font-style: normal;
  font-size: 11px;
  line-height: 1.36;
}

.email-verification-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.email-verification-primary {
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #4778f5 0%, #3567df 100%);
  box-shadow: 0 18px 34px rgba(53, 103, 223, 0.24);
}

.email-verification-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-secondary-btn {
  min-height: 46px;
  border: 1px solid rgba(221, 229, 242, 0.9);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.auth-secondary-btn:hover {
  background: #ffffff;
  border-color: rgba(190, 204, 226, 0.95);
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.07);
  transform: translateY(-1px);
}

.email-change-box {
  margin-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.78);
  padding-top: 16px;
}

.email-change-box.hidden {
  display: none;
}

.email-verification-note {
  margin-top: 14px;
  color: #768299;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.email-verification-gate .auth-message {
  margin-bottom: 0;
}

.email-verification-gate .auth-small-note {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

@media (max-width: 560px) {
  .email-verification-card {
    width: min(100%, 100%);
    border-radius: 26px;
  }

  .email-verification-panel {
    padding: 24px 18px;
  }

  .email-verification-steps,
  .email-verification-secondary-actions {
    grid-template-columns: 1fr;
  }

  .email-verification-step {
    min-height: auto;
  }
}
