.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f6f7f4;
}

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

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid #dfe4dc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(32, 37, 34, 0.12);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #24313a;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

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

.auth-panel p {
  margin: 5px 0 0;
  color: #667169;
  line-height: 1.55;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: #38423c;
  font-size: 13px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd7cf;
  border-radius: 6px;
  background: #ffffff;
  color: #202522;
  font: inherit;
}

.auth-submit {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #2f6f9f;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-secondary {
  min-height: 42px;
  border: 1px solid #cfd7cf;
  border-radius: 6px;
  background: #ffffff;
  color: #38423c;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-message {
  min-height: 20px;
  margin-top: 12px;
  color: #b84e45;
  font-size: 13px;
  line-height: 1.5;
}

.auth-setup {
  padding: 12px;
  border-left: 3px solid #bd7b20;
  background: #fff8ed;
  color: #5d4930;
  line-height: 1.6;
}

.cloud-account-bar {
  position: fixed;
  z-index: 950;
  top: 14px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 36px);
  padding: 7px 8px 7px 12px;
  border: 1px solid #dfe4dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(32, 37, 34, 0.1);
}

.cloud-save-status {
  overflow: hidden;
  color: #526058;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-sign-out {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #dfe4dc;
  border-radius: 6px;
  background: #ffffff;
  color: #38423c;
  cursor: pointer;
}

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

  .cloud-account-bar {
    top: auto;
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }
}
