/* The compiled Design Standard remains the authority for palette and type. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/inter-latin-600-normal.woff2") format("woff2");
}

html {
  color-scheme: light;
}

body.demo-login {
  min-height: 100dvh;
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--app-font-sans);
  -webkit-font-smoothing: antialiased;
}

.demo-login *,
.demo-login *::before,
.demo-login *::after {
  box-sizing: border-box;
}

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-6);
}

.login-brand {
  display: flex;
  justify-content: center;
}

.login-brand img {
  display: block;
  width: 158px;
  height: 60px;
  object-fit: contain;
}

.login-main {
  width: 100%;
  max-width: 420px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-8);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-card);
  animation: login-enter 320ms ease-out both;
}

.login-card h1 {
  margin: 0 0 var(--space-2);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.login-intro {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.6;
}

.login-form {
  margin-top: var(--space-6);
}

.login-form label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 14px;
  font-weight: 500;
}

.login-password {
  position: relative;
}

.login-password input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 76px 0 var(--space-3);
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 16px;
}

.login-password input[aria-invalid="true"] {
  border-color: hsl(var(--destructive));
}

.login-reveal {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 60px;
  min-height: 40px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.login-reveal:hover {
  background: hsl(var(--muted));
}

.login-error {
  margin: var(--space-3) 0 0;
  color: hsl(var(--destructive));
  font-size: 14px;
  line-height: 1.5;
}

.login-error[hidden] {
  display: none;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid hsl(var(--primary));
  border-radius: var(--radius-md);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.login-submit:hover:not(:disabled) {
  opacity: .9;
}

.login-submit:disabled,
.login-reveal:disabled {
  cursor: wait;
  opacity: .65;
}

.demo-login :focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.login-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--radius-sm);
}

.login-datifact {
  display: block;
  width: 72px;
  height: 20px;
  object-fit: contain;
}

.login-noscript {
  margin: var(--space-4) 0 0;
  color: hsl(var(--destructive));
  font-size: 14px;
}

@keyframes login-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .login-shell {
    padding: var(--space-6) var(--space-4);
  }

  .login-card {
    padding: var(--space-6);
  }

  .login-brand img {
    width: 140px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }
}
