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

:root {
  --lms-background: #ffffff;
  --lms-card: rgba(255, 255, 255, 0.9);
  --lms-border: #e5e7eb;
  --lms-input: #ffffff;
  --lms-foreground: #030712;
  --lms-muted: #6b7280;
  --lms-primary: #1e40af;
  --lms-primary-foreground: #f9fafb;
  --lms-danger: #dc2626;
  --lms-logo: #013463;
}

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

html,
body {
  min-height: 100%;
}

.login-pf body {
  margin: 0;
  min-height: 100vh;
  color: var(--lms-foreground);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background: var(--lms-background) url("../img/login-background.png") center / cover no-repeat;
}

.login-pf body:has(.lms-plain-bg) {
  background: var(--lms-background);
}

.login-pf-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.login-pf-page .login-pf-header,
.login-pf-page .login-pf-page-header,
#kc-header,
#kc-page-title,
#kc-info,
.alert-warning.pf-c-alert,
.alert-error.pf-c-alert.pf-m-inline.pf-m-danger {
  display: none;
}

.login-pf-page .card-pf {
  width: min(454px, 100%);
  max-width: 454px;
  padding: 0;
  margin: 0 auto;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#kc-content,
#kc-content-wrapper,
#kc-form,
#kc-form-wrapper {
  width: 100%;
  margin: 0;
}

.lms-cloud-card {
  width: 100%;
  overflow: hidden;
  background: var(--lms-card);
  border: 1px solid var(--lms-border);
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

.lms-logo-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 32px 0;
}

.lms-logo {
  display: block;
  width: 101px;
  height: 18px;
  object-fit: contain;
}

.lms-card-content {
  padding: 24px 31px 32px;
}

.lms-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  text-align: center;
}

.lms-heading h1 {
  margin: 0;
  color: var(--lms-foreground);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.lms-heading p {
  margin: 0;
  color: var(--lms-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.lms-login-form,
.lms-fields,
.lms-field,
.lms-actions {
  display: flex;
  flex-direction: column;
}

.lms-login-form {
  gap: 28px;
}

.lms-fields {
  gap: 16px;
}

.lms-field {
  gap: 8px;
}

.lms-field label,
.lms-checkbox,
.lms-link,
.lms-button,
.lms-demo {
  font-size: 14px;
  letter-spacing: 0;
}

.lms-field label {
  margin: 0;
  color: var(--lms-foreground);
  font-weight: 500;
  line-height: 20px;
}

.lms-field input {
  width: 100%;
  height: 36px;
  padding: 4px 12px;
  color: var(--lms-foreground);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  background: var(--lms-input);
  border: 1px solid var(--lms-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: none;
}

.lms-field input::placeholder {
  color: var(--lms-muted);
  opacity: 1;
}

.lms-field input:hover,
.lms-field input:focus {
  border-color: #cbd5e1;
}

.lms-field input:focus,
.lms-checkbox input:focus-visible,
.lms-button:focus-visible,
.lms-link:focus-visible {
  outline: 2px solid rgba(30, 64, 175, 0.28);
  outline-offset: 2px;
}

.lms-alert,
.lms-field-error {
  margin: 0;
  color: var(--lms-danger) !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.lms-field-error {
  font-size: 12px;
  line-height: 16px;
}

.lms-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lms-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--lms-foreground);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.lms-checkbox input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  background: var(--lms-input);
  border: 1px solid var(--lms-border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lms-checkbox input:checked {
  background: var(--lms-primary);
  border-color: var(--lms-primary);
  box-shadow: inset 0 0 0 3px var(--lms-input);
}

.lms-link {
  color: var(--lms-primary);
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.lms-link:hover {
  color: #17358f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lms-forgot-link {
  flex: 0 0 auto;
  text-align: right;
}

.lms-actions {
  gap: 12px;
}

.lms-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  padding: 8px 16px;
  font-weight: 500;
  line-height: 20px;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  text-align: center;
}

.lms-button-primary {
  color: var(--lms-primary-foreground);
  background: var(--lms-primary);
  border: 1px solid var(--lms-primary);
}

.lms-button-primary:hover,
.lms-button-primary:focus {
  background: #1d3b9b;
  border-color: #1d3b9b;
}

.lms-button-outline {
  gap: 8px;
  color: var(--lms-foreground);
  background: var(--lms-input);
  border: 1px solid var(--lms-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.lms-button-outline:hover,
.lms-button-outline:focus {
  color: var(--lms-foreground);
  background: #f8fafc;
  text-decoration: none;
}

.lms-button-outline img {
  width: 16px;
  height: 16px;
}

.lms-demo {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0;
  color: var(--lms-muted);
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

@media (max-width: 480px) {
  .login-pf-page {
    padding: 16px;
  }

  .lms-cloud-card {
    border-radius: 24px;
  }

  .lms-logo-wrap {
    padding: 28px 24px 0;
  }

  .lms-card-content {
    padding: 24px 20px 28px;
  }

  .lms-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .lms-forgot-link {
    padding-left: 24px;
    text-align: left;
  }
}

.lms-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.lms-dot {
  width: 12px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.lms-dot.is-done,
.lms-dot.is-active {
  background: var(--lms-primary);
}

.lms-dot.is-active {
  width: 20px;
}

.lms-heading-start {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}

.lms-heading-start h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
}

.lms-heading-start p {
  line-height: 20px;
}

.lms-heading-start strong {
  color: var(--lms-foreground);
  font-weight: 600;
}

.lms-field-row {
  display: flex;
  gap: 12px;
}

.lms-field-row .lms-field {
  flex: 1 1 0;
  min-width: 0;
}

.lms-input-wrap {
  position: relative;
  display: block;
}

.lms-input-wrap input {
  padding-right: 38px;
}

.lms-input-affix,
.lms-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--lms-muted);
  background: none;
  border: 0;
}

.lms-input-affix {
  pointer-events: none;
}

.lms-toggle {
  border-radius: 8px;
  cursor: pointer;
}

.lms-toggle:hover {
  color: var(--lms-foreground);
}

.lms-toggle:focus-visible {
  outline: 2px solid rgba(30, 64, 175, 0.28);
  outline-offset: -2px;
}

.lms-icon {
  width: 16px;
  height: 16px;
}

.lms-field input:disabled {
  color: var(--lms-muted);
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
  user-select: none;
}

.lms-reqs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lms-req {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lms-muted);
  font-size: 13px;
  line-height: 18px;
}

.lms-req-dot {
  display: inline-flex;
  flex: 0 0 14px;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
}

.lms-req-dot svg {
  width: 10px;
  height: 10px;
  color: #ffffff;
  visibility: hidden;
}

.lms-req.is-ok {
  color: #16a34a;
}

.lms-req.is-ok .lms-req-dot {
  background: #16a34a;
  border-color: #16a34a;
}

.lms-req.is-ok .lms-req-dot svg {
  visibility: visible;
}

.lms-actions-row {
  display: flex;
  gap: 12px;
}

.lms-actions-row .lms-button-primary {
  flex: 1 1 auto;
}

.lms-button-icon {
  flex: 0 0 44px;
  width: 44px;
  padding: 0;
}

.lms-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lms-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  text-align: center;
}

.lms-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 999px;
}

.lms-status-icon svg {
  width: 28px;
  height: 28px;
}

.lms-status-icon.is-ok {
  color: #16a34a;
  background: #dcfce7;
}

.lms-status-icon.is-warn {
  color: #b45309;
  background: #fef3c7;
  box-shadow: 0 0 0 8px #fffbeb;
}

.lms-status h1 {
  margin: 0;
  color: var(--lms-foreground);
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
}

.lms-status p {
  margin: 0;
  color: var(--lms-muted);
  font-size: 14px;
  line-height: 22px;
}

.lms-status-busy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lms-spinner {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--lms-primary);
  border-radius: 999px;
  animation: lms-spin 0.7s linear infinite;
}

@keyframes lms-spin {
  to { transform: rotate(360deg); }
}

.lms-note {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 12px 0;
  padding: 10px 12px;
  color: var(--lms-muted);
  font-size: 13px;
  line-height: 18px;
  background: #f3f4f6;
  border-radius: 8px;
}

.lms-note-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lms-badge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 8px;
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  border-radius: 999px;
}

.lms-status .lms-button-outline {
  width: auto;
  margin-top: 8px;
  padding: 8px 16px;
}

@media (max-width: 480px) {
  .lms-field-row {
    flex-direction: column;
    gap: 16px;
  }
}

[hidden] {
  display: none !important;
}
