/* ===== Lock / sign-in screen (light: dark text on the white wallpaper) ===== */
body {
  --text: #1b1b1f;
  --text-dim: rgba(0, 0, 0, 0.6);
  --stroke: rgba(0, 0, 0, 0.12);
  --danger: #c42b1c;
  color: var(--text);
  color-scheme: light;
}
:focus-visible { outline-color: #1b1b1f; }
.btn { background: rgba(255, 255, 255, 0.75); }
.btn:hover { background: rgba(255, 255, 255, 0.95); }
.btn.primary { border-color: rgba(0, 0, 0, 0.08); }

.brand {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;

  z-index: 5;
}
.brand .logo { width: 30px; vertical-align: -7px; margin-right: 8px; transform: rotate(-10deg); }

.stage { position: fixed; inset: 0; display: grid; place-items: center; z-index: 2; }

/* Lock screen */
.lock { place-items: start center; padding-top: 12vh; text-align: center; cursor: pointer; transition: transform 0.45s ease, opacity 0.45s ease; }
.lock-time { font-family: var(--font-display); font-size: clamp(72px, 13vw, 132px); font-weight: 600; line-height: 1; }
.lock-date { font-family: var(--font-display); font-size: clamp(18px, 2.6vw, 24px); margin-top: 10px; font-weight: 500; }
.lock-hint { position: fixed; bottom: 32px; left: 0; right: 0; color: var(--text-dim); font-size: 13px; animation: pulse 2.8s ease-in-out infinite; }
.lock.leaving { transform: translateY(-40vh); opacity: 0; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Panels */
.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(320px, calc(100vw - 32px));
  animation: rise 0.35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel h1 { margin: 6px 0 4px; font-family: var(--font-display); font-size: 28px; font-weight: 600; text-align: center; }
.panel p { margin: 0; color: var(--text-dim); text-align: center; line-height: 1.45; }
.panel form { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.field {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom-color: rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  user-select: text;
  transition: background 0.12s;
}
.field::placeholder { color: rgba(0, 0, 0, 0.55); }
.field:hover { background: rgba(255, 255, 255, 0.85); }
.field:focus { background: #fff; border-bottom: 2px solid #c79a00; }

.pw-row { position: relative; }
.pw-row .field { padding-right: 44px; }
.go {
  position: absolute; right: 3px; top: 3px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
}
.go:hover { background: rgba(0, 0, 0, 0.12); }
.go svg { width: 16px; height: 16px; }

/* Windows 11-style checkbox */
.remember { display: flex; align-items: center; gap: 10px; align-self: flex-start; padding: 4px 2px; font-size: 13px; cursor: pointer; }
.remember input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 18px; height: 18px; flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.45); border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.remember input:hover { background: rgba(0, 0, 0, 0.04); }
.remember input:checked { background: #c79a00; border-color: #c79a00; }
.remember input:checked::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.remember.disabled { opacity: 0.45; cursor: not-allowed; }
.remember.disabled input { cursor: not-allowed; }
.remember + .hint { align-self: flex-start; margin-top: -6px; }

.panel .btn { align-self: center; min-width: 120px; margin-top: 4px; }
.form-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 0; margin: 0; }
.hint { font-size: 12px; color: var(--text-dim); margin: -2px 0 0; }
.link-btn { background: none; border: 0; color: var(--text); padding: 4px 6px; border-radius: 4px; font-size: 13px; }
.link-btn:hover { background: rgba(0, 0, 0, 0.06); }

.message { text-align: center; }
.message .btn { margin-top: 18px; }

/* Welcome */
.welcome { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: rise 0.35s ease both; }
.welcome .name { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.welcome .status { display: flex; align-items: center; gap: 18px; font-family: var(--font-display); font-size: 24px; margin-top: 8px; }

/* Corners */
.corner-left { position: fixed; left: 20px; bottom: 20px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.corner-user {
  display: flex; align-items: center; gap: 12px;
  border: 0; background: transparent;
  padding: 8px 14px 8px 8px; border-radius: 6px;
  font-size: 14px; text-align: left;
  transition: background 0.12s;
}
.corner-user:hover { background: rgba(0, 0, 0, 0.06); }
.corner-user.active { background: rgba(0, 0, 0, 0.09); }
.corner-user .avatar svg { width: 50%; height: 50%; }

.corner-right { position: fixed; right: 20px; bottom: 20px; z-index: 5; display: flex; gap: 4px; }
.corner-right .icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 6px;
}
.corner-right .icon:hover { background: rgba(0, 0, 0, 0.06); }
.corner-right svg { width: 18px; height: 18px; }

@media (max-width: 560px), (max-height: 560px) {
  .avatar.xl { width: 120px; height: 120px; font-size: 44px; }
  .brand { top: 16px; font-size: 18px; }
  .lock-hint { bottom: 80px; }
}
