/* ===== Centred Card Layout ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body.login-pf {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--kc-bg-color);
  font-family: var(--kc-font-family);
  font-size: var(--kc-font-size);
  padding: 40px 20px;
  position: relative;
  overflow-y: auto;
}

body.login-pf::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../img/bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

.kc-login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--kc-card-max-width);
  margin: auto;
}

#kc-header-wrapper {
  text-align: center;
  margin-bottom: 16px;
}

#kc-header-wrapper img {
  max-height: var(--kc-logo-max-height);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.header-title {
  font-family: var(--kc-heading-font);
  font-size: 1.6em;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--kc-text-color);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin: 0;
}

.header-subtitle {
  font-size: 0.9em;
  color: var(--kc-accent-color);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.card-wrapper {
  border-radius: var(--kc-card-radius);
  box-shadow: var(--kc-card-shadow);
  overflow: hidden;
}

.accent-bar {
  height: 4px;
  background: var(--kc-accent-color);
}

.kc-login-card {
  background: var(--kc-card-bg);
  padding: var(--kc-card-padding);
}

/* Centre the form title for card layout */
.kc-login-card #kc-page-title {
  text-align: center;
}

.kc-page-footer {
  text-align: center;
  margin-top: 30px;
  font-size: 0.85em;
  color: var(--kc-text-color);
  letter-spacing: 0.02em;
  line-height: 1.8;
}
.kc-page-footer a { color: var(--kc-accent-color); text-decoration: none; }
.kc-page-footer a:hover { text-decoration: underline; }

/* Mobile responsive */
@media (max-width: 480px) {
  body.login-pf { padding: 20px 12px; }
  .kc-login-card { padding: 24px 18px; }
  #kc-header-wrapper { margin-bottom: 10px; }
  #kc-header-wrapper img { max-height: 50px; }
  .header-title { font-size: 1.2em; letter-spacing: 0.1em; }
  .header-subtitle { font-size: 0.75em; }
  .kc-page-footer { margin-top: 20px; padding-bottom: 10px; }
}


/* ===== Form Styling ===== */

/* Reset form text colour */
.form-panel,
.form-panel *,
.kc-login-card,
.kc-login-card * {
  color: #333;
}

#kc-page-title {
  font-size: 1.5em;
  margin-bottom: 8px;
  font-family: var(--kc-heading-font);
  font-weight: 600;
  color: var(--kc-primary-color);
  letter-spacing: -0.01em;
}

form { margin-top: 24px; }

/* Floating label inputs */
.form-group { margin-bottom: 22px; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #aab;
  pointer-events: none;
  transition: color 0.25s;
  z-index: 1;
}

.input-wrapper input[type="text"],
.input-wrapper input[type="password"],
.input-wrapper input[type="email"] {
  width: 100%;
  height: 56px;
  padding: 22px 16px 6px 48px;
  border: 1.5px solid #dde0e5;
  border-radius: var(--kc-btn-radius, 12px);
  font-family: var(--kc-font-family);
  font-size: 1em;
  color: #1a1a2e;
  background: #f5f6f8;
  transition: all 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.input-wrapper label {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95em;
  color: #9a9ab0;
  font-weight: 400;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
  margin: 0;
}

.input-wrapper input:focus ~ label,
.input-wrapper input:not(:placeholder-shown) ~ label {
  top: 10px;
  transform: translateY(0) scale(0.75);
  color: var(--kc-primary-color);
  font-weight: 500;
}

.input-wrapper input:focus {
  border-color: var(--kc-primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 41, 55, 0.10), 0 2px 8px rgba(0,0,0,0.04);
}

.input-wrapper input:focus ~ .input-icon {
  color: var(--kc-primary-color);
}

/* Form options row */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  font-size: 0.85em;
}

label.remember-me,
.remember-me {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #666 !important;
  font-weight: 400 !important;
  cursor: pointer;
  margin: 0 !important;
}

.remember-me input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: #fff;
  transition: all 0.2s;
}

.remember-me input[type="checkbox"]:checked {
  background: var(--kc-primary-color);
  border-color: var(--kc-primary-color);
}

.remember-me input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-options a {
  color: var(--kc-link-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.form-options a:hover {
  color: var(--kc-primary-color);
  text-decoration: underline;
}

/* Primary button */
.btn-primary {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--kc-primary-color), color-mix(in srgb, var(--kc-primary-color) 75%, #000));
  color: var(--kc-btn-text, #fff);
  border: none;
  border-radius: var(--kc-btn-radius, 12px);
  font-family: var(--kc-font-family);
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(5, 41, 55, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(5, 41, 55, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(5, 41, 55, 0.2);
}

.btn-primary .btn-arrow,
.btn-primary .btn-arrow * {
  width: 18px;
  height: 18px;
  color: var(--kc-btn-text, #fff);
  stroke: var(--kc-btn-text, #fff);
  transition: transform 0.3s ease;
}
.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* Form subtitle */
.form-subtitle {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 4px;
  line-height: 1.5;
}

/* Social providers */
#kc-social-providers { margin-top: 24px; }

.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.8em;
  color: #aaa;
  text-transform: lowercase;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.social-buttons {
  display: flex;
  gap: 10px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--kc-btn-radius, 12px);
  background: #fff;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 500;
  color: #444;
  transition: all 0.2s ease;
  cursor: pointer;
}
.social-btn:hover,
.social-btn:focus {
  border-color: #ccc;
  background: #f9f9fb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Social provider icons via CSS data URIs */
.social-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.social-icon-microsoft {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='10' height='10' fill='%23F25022'/%3E%3Crect x='13' y='1' width='10' height='10' fill='%237FBA00'/%3E%3Crect x='1' y='13' width='10' height='10' fill='%2300A4EF'/%3E%3Crect x='13' y='13' width='10' height='10' fill='%23FFB900'/%3E%3C/svg%3E");
}
.social-icon-oidc,
.social-icon-is2support {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23052937' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.social-icon-google {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z' fill='%234285F4'/%3E%3Cpath d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z' fill='%2334A853'/%3E%3Cpath d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z' fill='%23FBBC05'/%3E%3Cpath d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z' fill='%23EA4335'/%3E%3C/svg%3E");
}
.social-icon-github {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z' fill='%23333'/%3E%3C/svg%3E");
}

/* Form wrapper reset (no inner card) */
#kc-form-wrapper {
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Register / back link */
.kc-register-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85em;
  color: #888;
}
.kc-register-link a {
  color: var(--kc-link-color);
  font-weight: 500;
  text-decoration: none;
}
.kc-register-link a:hover { text-decoration: underline; }

/* Alert messages */
.alert {
  padding: 10px 14px;
  border-radius: var(--kc-btn-radius, 12px);
  margin-bottom: 16px;
  font-size: 0.9em;
}
.alert-error {
  color: var(--kc-error-color);
  border: 1px solid var(--kc-error-color);
  background: rgba(217, 48, 37, 0.05);
}
.alert-success {
  color: #34a853;
  border: 1px solid #34a853;
  background: rgba(52, 168, 83, 0.05);
}
.alert-warning {
  color: #f9a825;
  border: 1px solid #f9a825;
  background: rgba(249, 168, 37, 0.05);
}
.alert-info {
  color: var(--kc-primary-color);
  border: 1px solid var(--kc-primary-color);
  background: rgba(5, 41, 55, 0.05);
}

/* Input error message */
.input-error-message {
  display: block;
  margin-top: 6px;
  font-size: 0.82em;
  color: var(--kc-error-color);
}

/* Error page */
.error-page { text-align: center; padding: 10px 0; }
.error-icon { margin-bottom: 16px; }
.error-page #kc-page-title { text-align: center; }

/* Info / Verify pages */
.info-page { text-align: center; padding: 10px 0; }
.info-icon { margin-bottom: 16px; }
.info-page #kc-page-title { text-align: center; }

/* Social buttons stack on small screens */
@media (max-width: 420px) {
  .social-buttons { flex-direction: column; }
}


.branding-content .branding-title { display: none !important; } .branding-content .branding-subtitle { display: none !important; } #kc-header-wrapper .header-title { display: none !important; } #kc-header-wrapper .header-subtitle { display: none !important; }

