/* SmartOffice Keycloak Login Theme
 * Split layout matching the original smo-admin/ui login page.
 * Left: white background with SmartOffice icon
 * Right: dark blue (#003258) background with login form
 */

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #ffffff;
}

/* Split layout wrapper */
.smo-login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left side — white background with SmartOffice icon */
.smo-login-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
}

.smo-icon {
  width: 500px;
  height: 500px;
  object-fit: contain;
}

/* Right side — dark blue background with form */
.smo-login-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #003258;
}

.smo-form-container {
  width: 280px;
  padding: 20px;
}

/* Form groups */
.smo-form-group {
  margin-bottom: 20px;
}

.smo-form-group label {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 6px;
}

/* Input fields */
.smo-form-group input[type="text"],
.smo-form-group input[type="password"],
.smo-form-group input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  color: #1a1a1a;
  background: #ffffff;
  border: 1px solid #f8f8f8;
  border-radius: 8px;
  line-height: 23px;
  outline: none;
  transition: border-color 0.2s ease;
}

.smo-form-group input[type="text"]:focus,
.smo-form-group input[type="password"]:focus,
.smo-form-group input[type="email"]:focus {
  border-color: #e26406;
}

/* Remember Me checkbox */
.smo-remember-me {
  margin-top: 16px;
}

.smo-remember-me label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  cursor: pointer;
}

.smo-remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #e26406;
  cursor: pointer;
}

/* Submit button */
.smo-form-actions {
  margin-top: 24px;
  margin-bottom: 20px;
}

.smo-form-actions input[type="submit"] {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #e26406;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.smo-form-actions input[type="submit"]:hover {
  background-color: #c85400;
}

/* Footer links (forgot password, back to login) */
.smo-form-footer {
  text-align: center;
  margin-top: 12px;
}

.smo-form-footer a {
  color: #ffffff;
  font-size: 13px;
  text-decoration: none;
  opacity: 0.85;
}

.smo-form-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Alert messages */
.smo-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

.smo-alert-error {
  background-color: rgba(255, 77, 79, 0.15);
  border: 1px solid rgba(255, 77, 79, 0.4);
  color: #ffccc7;
}

.smo-alert-success {
  background-color: rgba(82, 196, 26, 0.15);
  border: 1px solid rgba(82, 196, 26, 0.4);
  color: #d9f7be;
}

.smo-alert-warning {
  background-color: rgba(250, 173, 20, 0.15);
  border: 1px solid rgba(250, 173, 20, 0.4);
  color: #fff1b8;
}

.smo-alert-info {
  background-color: rgba(22, 119, 255, 0.15);
  border: 1px solid rgba(22, 119, 255, 0.4);
  color: #bae0ff;
}

/* Read-only inputs (e.g. pre-filled email in profile update) */
.smo-form-group input[readonly] {
  background: rgba(255, 255, 255, 0.55);
  color: #555;
  cursor: default;
}

/* Input error messages */
.smo-input-error {
  display: block;
  color: #ff7875;
  font-size: 12px;
  margin-top: 4px;
}

/* Info section (e.g., password reset instructions) */
.smo-info {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

.smo-info p {
  margin: 0;
}

/* Responsive — stack vertically on narrow screens */
@media (max-width: 900px) {
  .smo-login-wrapper {
    flex-direction: column;
  }

  .smo-login-left {
    flex: none;
    padding: 40px 20px 20px;
  }

  .smo-icon {
    width: 200px;
    height: 200px;
  }

  .smo-login-right {
    flex: 1;
    padding: 20px;
  }

  .smo-form-container {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 500px) {
  .smo-login-left {
    padding: 30px 20px 10px;
  }

  .smo-icon {
    width: 150px;
    height: 150px;
  }

  .smo-form-container {
    max-width: 280px;
  }
}
