/* Findable — screen layouts: login, dashboard, transitions */

/* ---------- Pin drop-in (login wordmark) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .logo-pin--drop {
    animation: pinDrop calc(var(--m) * 620ms) cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--m) * 520ms);
  }
  @keyframes pinDrop {
    from { transform: translateY(-0.5em); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

/* ---------- Stage / screen transitions ---------- */

.stage {
  height: 100%;
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  transition: opacity calc(var(--m) * 500ms) ease;
}
.screen--leaving {
  opacity: 0;
  pointer-events: none;
}
.screen--entering {
  animation: screenIn calc(var(--m) * 700ms) cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Login ---------- */

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--wall-text);
  transition: opacity calc(var(--m) * 560ms) ease, transform calc(var(--m) * 560ms) ease;
}
.login--unlocking {
  opacity: 0;
  transform: scale(0.985);
}

.login__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.login__word {
  margin: 0;
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--wall-text);
}

.login__tagline {
  margin: 14px 0 0;
  font-size: 16.5px;
  font-weight: 450;
  color: var(--wall-text-soft);
  max-width: 40ch;
}

.login__form {
  margin-top: 44px;
  width: min(340px, 84vw);
}

.login__field {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid color-mix(in oklab, var(--wall-text) 30%, transparent);
  transition: border-color calc(var(--m) * 240ms) ease;
  padding-bottom: 6px;
}
.login__field:focus-within {
  border-color: var(--wall-text);
}
.login__field--error {
  border-color: var(--red) !important;
}

.login__field input {
  flex: 1;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font: inherit;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--wall-text);
  padding: 10px 2px;
}
.login__field input::placeholder {
  color: color-mix(in oklab, var(--wall-text) 42%, transparent);
  letter-spacing: 0.01em;
}

.login__go {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #FFFFFF;
  transition: background-color calc(var(--m) * 200ms) ease, transform calc(var(--m) * 160ms) ease;
}
.login__go:hover { background: var(--accent-deep); transform: scale(1.06); }
.login__go:active { transform: scale(0.95); }

.login__check {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: checkDraw calc(var(--m) * 360ms) ease forwards;
}
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

.login__error {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 550;
  color: var(--red);
  text-align: left;
}
.wall--ink .login__error { color: var(--red-light); }
.wall--ink .login__field--error { border-color: var(--red-light) !important; }

.login__form--shake {
  animation: shake calc(var(--m) * 480ms) cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.login__foot {
  padding: 28px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--wall-text) 45%, transparent);
}

/* ---------- Dashboard ---------- */

.dash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  border-bottom: 1px solid var(--line);
}
.dash__topbar .logo-lockup { font-size: 19px; }

.dash__topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dash__site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-soft);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.dash__main {
  width: min(980px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 52px 0 80px;
}

.dash__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.dash__heading h1 {
  margin: 6px 0 0;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dash__actions {
  display: flex;
  gap: 12px;
}

.dash__filters {
  display: flex;
  gap: 4px;
  margin-top: 34px;
  border-bottom: 1px solid var(--line);
}

.dash__filter {
  appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 10px 14px;
  position: relative;
  transition: color calc(var(--m) * 180ms) ease;
}
.dash__filter:hover { color: var(--ink); }
.dash__filter::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform calc(var(--m) * 260ms) cubic-bezier(0.22, 1, 0.36, 1);
}
.dash__filter--on { color: var(--ink); }
.dash__filter--on::after { transform: scaleX(1); }

/* table */

.dash__table {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}

.dash__row {
  display: grid;
  grid-template-columns: 1fr 110px 130px 100px 40px;
  align-items: center;
  gap: 18px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  appearance: none;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: background-color calc(var(--m) * 180ms) ease;
}
.dash__row:hover { background: rgba(158, 170, 185, 0.12); }

.dash__row--head {
  cursor: default;
  padding-top: 22px;
  padding-bottom: 10px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.dash__row--head:hover { background: transparent; }

.dash__cell-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.dash__cell-name strong {
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash__source {
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.dash__targets, .dash__updated {
  font-size: 14px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.dash__arrow {
  color: var(--ink-faint);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity calc(var(--m) * 200ms) ease, transform calc(var(--m) * 200ms) ease;
  display: flex;
  justify-content: flex-end;
}
.dash__row:hover .dash__arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.dash__empty {
  padding: 48px 14px;
  color: var(--ink-faint);
  font-size: 15px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: var(--ink-deep);
  color: #F8F9FC;
  font-size: 14px;
  font-weight: 550;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0, 19, 53, 0.5);
  animation: toastIn calc(var(--m) * 360ms) cubic-bezier(0.22, 1, 0.36, 1) both;
  z-index: 50;
}
.toast--out {
  animation: toastOut calc(var(--m) * 300ms) ease both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, 8px); }
}
