:root {
  /* Primary Colors - Alpamayo Blue */
  --primary-50: #edf5f7;
  --primary-100: #ddecf0;
  --primary-200: #adcfd9;
  --primary-300: #82b0bf;
  --primary-400: #3f7791;
  --primary-500: #134562;
  --primary-600: #0f3a57;
  --primary-700: #0a2c47;
  --primary-800: #06213b;
  --primary-900: #04162b;
  --primary-950: #020d1c;

  /* Secondary Colors - Alpamayo Orange */
  --secondary-50: #fee6e1;
  --secondary-100: #fdd7ce;
  --secondary-200: #fbb6a7;
  --secondary-300: #f99680;
  --secondary-400: #f87659;
  --secondary-500: #f55632;
  --secondary-600: #e4340a;
  --secondary-700: #ae2708;
  --secondary-800: #7a1b05;
  --secondary-900: #440f03;
  --secondary-950: #2a0902;
  --secondary-contrast: #ffffff;
  --secondary-emphasis: #2a0902;
  --secondary-default: #f55632;

  --surface-0: #ffffff;
  --surface-50: #f9fbff;
  --surface-100: #f1f5ff;
  --surface-200: #e9ecf7;
  --surface-300: #d0d4e2;
  --surface-400: #a6abb9;
  --surface-500: #7b809a;
  --surface-600: #63667b;
  --surface-700: #4b4f61;
  --surface-800: #343646;
  --surface-900: #1d1f2e;
  --surface-950: #020617;

  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-300: #fca5a5;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;
  --danger-800: #991b1b;
  --danger-900: #7f1d1d;
  --danger-950: #450a0a;
  --danger-contrast: #ffffff;
  --danger-emphasis: #450a0a;
  --danger-default: #ef4444;

  --keycloak-logo-url: url("../img/logo.webp");
  --keycloak-logo-height: 45px;
  --keycloak-logo-width: 160px;

  --border-radius: 6px;
}

.login-pf-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-pf body {
  background: none;
  background-color: var(--surface-100);
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  height: 100%;
  color: var(--surface-700);
}

.login-pf-page .login-pf-header {
  margin-bottom: 20px !important;
}

div.kc-logo-text {
  background-image: var(--keycloak-logo-url);
  height: var(--keycloak-logo-height);
  width: var(--keycloak-logo-width);
  background-repeat: no-repeat;
  background-size: contain;
  margin: 0 auto;
}

div.kc-logo-text span {
  display: none;
}

#kc-page-title {
  font-weight: 400 !important;
}

#kc-locale {
  display: none;
}

.card-pf {
  width: 400px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: var(--surface-0);
}

.pf-c-form-control {
  border: 1px solid var(--surface-300) !important;
  border-radius: var(--border-radius) !important;
  padding: 8px 12px !important;
  width: 100% !important;
  box-sizing: border-box;
  outline: none;
}

.pf-c-form-control:focus {
  border-color: var(--primary-400) !important;
}

#input-error {
  color: var(--danger-500) !important;
}

.pf-c-form-control[aria-invalid="true"] {
  border-color: var(--danger-500) !important;
}

#password.pf-c-form-control {
  border-radius: var(--border-radius) 0px 0px var(--border-radius) !important;
}

.pf-c-button.pf-m-primary {
  color: var(--surface-0);
  background-color: var(--secondary-500);
  font-size: 16px;
}

.pf-c-button.pf-m-primary:hover {
  background-color: var(--secondary-400) !important;
}

.pf-c-button.pf-m-block {
  display: block;
  width: 100%;
  height: 40px;
  border-radius: var(--border-radius);
}

.pf-c-button:after {
  border: 1px solid var(--surface-300) !important;
  border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}

.pf-c-button:hover {
  background-color: var(--surface-100) !important;
}

.kc-login-tooltip {
  position: relative;
  display: inline-block;
}

.kc-login-tooltip .kc-tooltip-text {
  top: -3px;
  left: 160%;
  background-color: black;
  visibility: hidden;
  color: #fff;
  min-width: 130px;
  text-align: center;
  border-radius: 2px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  padding: 5px;
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s;
}

.kc-login-tooltip:hover .kc-tooltip-text {
  visibility: visible;
  opacity: 0.7;
}

.kc-login-tooltip .kc-tooltip-text::after {
  content: " ";
  position: absolute;
  top: 15px;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

@media (max-width: 768px) {
  .login-pf body {
    background-color: var(--surface-0) !important;
    background-image: none !important;
  }

  .card-pf {
    border-radius: 0px;
    box-shadow: none;
  }

  .login-pf-page .login-pf-header h1 {
    text-align: left;
  }
}

@media (max-width: 400px) {
  .card-pf {
    width: 100%;
  }
}
