/* Sign-in page styles.
   Kept in their own file because style.css is only served to a signed-in
   session, while this sheet ships with the public sign-in document (login.html)
   and is also loaded by the in-page fallback sign-in view in index.html.
   Self-contained on purpose: no .btn / .btn-primary dependency, sans-serif
   rather than the app's monospace identity, and nothing naming the product. */

body.login-page {
  margin: 0;
  background: #f5f6f8;
  -webkit-text-size-adjust: 100%;
}

#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f5f6f8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#view-login.hidden {
  display: none;
}

.login-container {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05);
  padding: 32px 28px;
  width: 360px;
  max-width: 90vw;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #1f2328;
  margin: 0 0 6px;
}

.login-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.login-form .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.login-form .form-group input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24,144,255,0.15);
}

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

.login-error {
  color: #ff4d4f;
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 6px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #1890ff;
  border: 1px solid #1890ff;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
}

.login-btn:hover:not(:disabled) {
  background: #0f7ae5;
  border-color: #0f7ae5;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#login-totp-group.hidden {
  display: none;
}

/* The verification-code field: centred and letter-spaced so the 6 digits read
   as a code rather than a password. */
#login-totp {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  font-size: 18px;
  font-family: inherit;
  letter-spacing: 6px;
  text-align: center;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

#login-totp:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24,144,255,0.15);
}

/* Small screens: tighten the card */
@media (max-width: 768px) {
  .login-container {
    padding: 24px 20px;
  }
}
