@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; }

:root {
  --text-color: rgb(136,106,69);
  --icon-color: rgba(136,106,69,.5);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Inter", sans-serif;
}

body {
  min-width: 350px;
  min-height: 370px;
  background: url('../images/LoginBackground.png') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo */
.logo {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.logo img {
  width: clamp(120px, 20vw, 199px);
  height: auto;
}

/* Card */
.card {
  width: 360px;
  min-height: 420px;
  position: relative;
}

/* Glass effect */
.page {
  position: absolute;
  width: 100%;
  padding: 40px;
  border-radius: 16px;

  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);

  color: var(--text-color);

  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.page.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
}

img.user {
  margin: auto;
  display: block;
  border: 2px solid white;
  border-radius: 50%;
  padding: 5px;
  background: var(--icon-color);
}

/* Fields */
.field {
  position: relative;
  margin-bottom: 25px;
}

.field input {
  width: 100%;
  padding: 14px 12px;
  border: none;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.field label {
  position: absolute;
  left: 12px;
  top: 14px;
  font-size: 14px;
  pointer-events: none;
  transition: 0.2s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input:-webkit-autofill + label,
.field input:-webkit-autofill:focus + label,
.field input:-moz-autofill + label,
.field input:-moz-autofill:focus + label {
    top: -8px;
    left: 8px;
    font-size: 11px;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: white;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
}

.link-button {
    margin-top: 15px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.link-button:hover {
    opacity: 1;
}

input:-webkit-autofill {
    transition: background-color 9999s ease-in-out 0s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input:-webkit-autofill + label {
    top: -8px;
    left: 8px;
    font-size: 11px;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.error-message {
    color: darkred;
    text-align: center;
    margin-top: 10px;
margin-bottom:20px;
    font-size: 14px;
}