/* === Rocket.Chat Login Page Styles === */
/* Fuselage-inspired design system */

/* Inter font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&amp;display=swap");

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

html, body {
  height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #F7F8FA;
  color: #2F343D;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

/* === Login Card === */
.login-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 32px;
}

/* === Logo === */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo svg {
  width: 180px;
  height: auto;
}

/* === Title === */
.login-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 28px;
  color: #2F343D;
}

/* === Form === */
.login-form {
  display: flex;
  flex-direction: column;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6C727A;
  margin-bottom: 6px;
}

/* === Inputs === */
.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #2F343D;
  background: #FFFFFF;
  border: 1px solid #E4E7EA;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrapper input::placeholder {
  color: #9CA2A8;
}

.input-wrapper input:focus {
  border-color: #156FF7;
  box-shadow: 0 0 0 2px rgba(21, 111, 247, 0.15);
}

.input-wrapper input.input-error {
  border-color: #D40C26;
  box-shadow: 0 0 0 2px rgba(212, 12, 38, 0.12);
}

/* === Password toggle (eye icon) === */
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA2A8;
  transition: color 0.15s;
}

.password-toggle:hover {
  color: #6C727A;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* === Error message === */
.field-error {
  font-size: 12px;
  font-weight: 400;
  color: #D40C26;
  margin-top: 4px;
  min-height: 16px;
  opacity: 0;
  transition: opacity 0.15s;
}

.field-error.visible {
  opacity: 1;
}

/* === Submit button === */
.form-submit {
  margin-top: 4px;
  margin-bottom: 24px;
}

.btn-login {
  width: 100%;
  height: 40px;
  background: #156FF7;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-login:hover {
  background: #10529E;
}

.btn-login:active {
  background: #0D3B6E;
}

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

/* === Spinner === */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* === Form error (server response) === */
.form-error {
  font-size: 13px;
  font-weight: 400;
  color: #D40C26;
  text-align: center;
  margin-bottom: 16px;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.15s;
}

.form-error.visible {
  opacity: 1;
}

/* === Links row === */
.login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-link {
  font-size: 13px;
  font-weight: 400;
  color: #C0C4C8;
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.6;
  transition: none;
}

.login-link:hover {
  color: #C0C4C8;
}

/* === Footer === */
.login-footer {
  margin-top: 32px;
  text-align: center;
}

.login-footer span {
  font-size: 11px;
  font-weight: 400;
  color: #9CA2A8;
}

/* === Mobile: screens < 480px === */
@media (max-width: 480px) {
  body {
    padding: 0;
    justify-content: flex-start;
    background-color: #FFFFFF;
  }

  .login-wrapper {
    max-width: 100%;
  }

  .login-card {
    border-radius: 0;
    box-shadow: none;
    padding: 32px 24px;
  }

  .login-title {
    margin-bottom: 24px;
  }

  .login-logo svg {
    width: 160px;
  }
}

/* === Tablet: 480-768px === */
@media (min-width: 481px) and (max-width: 768px) {
  .login-wrapper {
    max-width: 360px;
  }
}
