/* KOMTAS login — uses design tokens from /app/komtas-design-system.css */

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #f6f5f1;
}

.hidden {
  display: none !important;
}

.app-root {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(42, 79, 63, 0.07), transparent 55%),
    var(--bg-canvas, #f6f5f1);
}

.login-shell {
  width: min(440px, 100%);
}

.login-card {
  width: 100%;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-soft, #ebe9e2);
  border-radius: var(--r-xl, 16px);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-popover, 0 12px 40px rgba(22, 24, 26, 0.08));
  animation: login-fade-in 220ms ease-out both;
}

.login-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -32px -28px 24px;
  border-radius: var(--r-xl, 16px) var(--r-xl, 16px) 0 0;
  background: linear-gradient(90deg, var(--accent, #2a4f3f), #3d6b55);
}

.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.login-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--r-lg, 12px);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  background: var(--accent-soft, #e5ece7);
  color: var(--accent, #2a4f3f);
  border: 1px solid var(--accent-ring, rgba(42, 79, 63, 0.18));
}

.login-brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-strong, #16181a);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-brand p {
  margin: 5px 0 0;
  color: var(--fg-muted, #8b8d91);
  font-size: 13px;
  line-height: 1.4;
}

.login-step {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-strong, #16181a);
  letter-spacing: 0.01em;
}

.field input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--fg-strong, #16181a);
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border, #ddd9cf);
  border-radius: var(--r-md, 8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--fg-faint, #b6b6b1);
}

.field input:hover {
  border-color: var(--border-strong, #c4c0b4);
}

.field input:focus {
  outline: none;
  border-color: var(--accent, #2a4f3f);
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(42, 79, 63, 0.18));
}

.login-step .btn {
  width: 100%;
  margin-top: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.login-step .btn.ghost {
  margin-top: 10px;
}

.hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  color: var(--fg-soft, #5b5d61);
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg-sunk, #f1efea);
  border: 1px solid var(--border-soft, #ebe9e2);
  border-radius: var(--r-md, 8px);
}

.hint strong {
  color: var(--fg-strong, #16181a);
  font-weight: 600;
}

.status {
  min-height: 1.25em;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft, #ebe9e2);
  font-size: 13px;
  color: var(--fg-muted, #8b8d91);
  line-height: 1.45;
}

.status.err {
  color: var(--status-failed-fg, #9b2c2c);
}

.status.ok {
  color: var(--status-complete-fg, #2a4f3f);
}

.hcaptcha-box {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-sunk, #f1efea);
  border: 1px solid var(--border-soft, #ebe9e2);
  border-radius: var(--r-md, 8px);
  overflow: hidden;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--fg-faint, #b6b6b1);
}

@keyframes login-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .app-root {
    padding: 20px 16px;
    align-items: flex-start;
    padding-top: 48px;
  }

  .login-card {
    padding: 24px 20px 20px;
  }

  .login-card::before {
    margin: -24px -20px 20px;
  }
}
