:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17201e;
  background: #111614;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #111614;
}

button, input { font: inherit; letter-spacing: 0; }

button { cursor: pointer; }

.auth-backdrop {
  position: fixed;
  inset: 0;
  background-image: url("/auth-ui/assets/login-office.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}

.auth-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 12, .48);
}

.brand-lockup {
  position: fixed;
  top: 30px;
  left: 34px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  font-family: ui-serif, "Songti SC", serif;
}

.auth-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: 76px 20px 56px;
  place-items: center;
}

.auth-dialog {
  width: min(100%, 414px);
  min-height: 488px;
  padding: 38px 38px 26px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 8px;
  background: rgba(248, 250, 249, .91);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(24px) saturate(.9);
  backdrop-filter: blur(24px) saturate(.9);
}

.dialog-heading { margin-bottom: 30px; }

.eyebrow {
  margin: 0 0 12px;
  color: #66716d;
  font-size: 11px;
  font-weight: 700;
}

h1 {
  margin: 0;
  color: #151d1b;
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.2;
}

.dialog-heading > p:last-child {
  margin: 10px 0 0;
  color: #68736f;
  font-size: 13px;
  line-height: 1.65;
}

#auth-form { display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }

.field > span:first-child {
  color: #3c4643;
  font-size: 12px;
  font-weight: 650;
}

.field input {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 1px solid #cbd1ce;
  border-radius: 6px;
  outline: none;
  background: rgba(255, 255, 255, .68);
  color: #18211f;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.field input:hover { border-color: #aeb8b4; }

.field input:focus {
  border-color: #607f76;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(96, 127, 118, .14);
}

.field input[readonly] {
  color: #65706c;
  background: rgba(232, 236, 234, .72);
}

.password-field { position: relative; display: block; }

.password-field input { padding-right: 60px; }

.text-control {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #596762;
  font-size: 12px;
}

.text-control:hover { color: #15201c; }

.form-message {
  min-height: 18px;
  margin: -4px 0 -4px;
  color: #a3453f;
  font-size: 12px;
  line-height: 1.5;
}

.form-message.ok { color: #3e7162; }

.primary-action {
  display: flex;
  width: 100%;
  height: 49px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 18px;
  border: 1px solid #1a2421;
  border-radius: 6px;
  background: #1a2421;
  color: #f9fbfa;
  box-shadow: 0 10px 24px rgba(22, 34, 30, .17);
  font-size: 14px;
  font-weight: 700;
  transition: transform .16s ease, background-color .16s ease;
}

.primary-action:hover { background: #283632; }
.primary-action:active { transform: translateY(1px); }
.primary-action:disabled { cursor: wait; opacity: .64; }
.button-arrow { font-size: 18px; font-weight: 400; }

.dialog-foot {
  display: flex;
  margin-top: 28px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7a8581;
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b9486;
  box-shadow: 0 0 0 3px rgba(107, 148, 134, .12);
}

.photo-credit {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  color: rgba(255, 255, 255, .52);
  font-size: 10px;
}

.photo-credit a { color: inherit; }

@media (max-width: 560px) {
  .brand-lockup { top: 20px; left: 20px; }
  .auth-stage { padding: 68px 14px 42px; }
  .auth-dialog { min-height: 0; padding: 30px 24px 22px; }
  h1 { font-size: 27px; }
  .photo-credit { right: 12px; bottom: 9px; }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-dialog { animation: dialog-in .38s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}
