/* Peak4 Keycloak Login Theme — standalone */

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

body, .peak4-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 50%, #1a1a2e 100%);
  color: #333;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.peak4-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.peak4-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem 2rem;
}

/* Logo */
.peak4-logo-container {
  text-align: center;
  margin-bottom: 1.75rem;
}

.peak4-logo-container svg {
  height: 36px;
  width: auto;
}

/* Intro */
.peak4-intro {
  margin-bottom: 1.5rem;
}

.peak4-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.peak4-subtitle {
  font-size: 0.8125rem;
  color: #888;
}

/* Alerts */
.peak4-alert {
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.peak4-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.peak4-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.peak4-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.peak4-alert-info {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.375rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #333;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

input::placeholder {
  color: #9ca3af;
}

/* Settings row (remember me + forgot password) */
.login-pf-settings,
.form-group:has(.checkbox) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.checkbox label {
  font-size: 0.8125rem;
  color: #666;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  accent-color: #4361ee;
}

/* Forgot password */
#forgot-password-link a,
.login-pf-settings a {
  font-size: 0.8125rem;
  color: #4361ee;
  text-decoration: none;
  font-weight: 500;
}

#forgot-password-link a:hover,
.login-pf-settings a:hover {
  text-decoration: underline;
}

/* Login button */
#kc-login {
  display: block;
  width: 100%;
  background: #4361ee;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
  margin-top: 0.25rem;
}

#kc-login:hover {
  background: #3a56d4;
}

#kc-login:active {
  transform: scale(0.995);
}

/* SSO section */
.peak4-sso-section {
  margin: 0.25rem 0 0.75rem;
}

.peak4-sso-message {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #3730a3;
  font-size: 0.8125rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

/* SSO fallback */
.peak4-sso-fallback {
  text-align: center;
  margin-top: 0.75rem;
}

.peak4-sso-fallback a {
  color: #888;
  font-size: 0.8125rem;
  text-decoration: none;
}

.peak4-sso-fallback a:hover {
  text-decoration: underline;
  color: #555;
}

/* Info / registration link */
.peak4-info {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  color: #666;
}

.peak4-info a {
  color: #4361ee;
  font-weight: 600;
  text-decoration: none;
}

.peak4-info a:hover {
  text-decoration: underline;
}

/* Hide social providers */
#kc-social-providers {
  display: none !important;
}

/* Error input state */
.has-error input {
  border-color: #ef4444;
}

.has-error .help-block,
.kc-feedback-text {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 480px) {
  .peak4-card {
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 12px;
  }
}
