* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f1f3f4;
  display: grid;
  place-items: center;
  color: #202124;
}

/* ===== Background brighten during loading ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1;
}

body.loading::after {
  opacity: 1;
}

/* ===== Card ===== */
.login-shell {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  min-height: 420px;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  padding: 48px;
  gap: 48px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* ===== Loader (UNCHANGED) ===== */
.login-loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.login-loader::before {
  content: "";
  position: absolute;
  left: -55%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    #1a73e8,
    transparent
  );
}

.login-loader.active {
  opacity: 1;
}

.login-loader.active::before {
  animation: loginLoader 1.1s ease-in-out infinite;
}

@keyframes loginLoader {
  from { left: -55%; }
  to   { left: 100%; }
}

/* ===== Left ===== */
.login-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.logo img {
  height: 38px;
}

.login-left h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

/* ===== Floating inputs ===== */
.field {
  position: relative;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 20px 14px 6px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  font-size: 16px;
  background: transparent;
}

.field input:focus {
  outline: none;
  border-color: #1a73e8;
}

.field label {
  position: absolute;
  left: 14px;
  top: 18px;
  font-size: 16px;
  color: #5f6368;
  pointer-events: none;
  background: white;
  padding: 0 4px;
  transition: all .15s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: -7px;
  font-size: 12px;
  color: #1a73e8;
}

/* ===== Errors (PROTOTYPE BEHAVIOUR) ===== */
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #d93025;
}

.field.error input {
  border-color: #d93025;
}

.field.error label {
  color: #d93025;
}

.ack.error label {
  color: #d93025;
}

/* ===== Right ===== */
.login-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ack {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: #5f6368;
  line-height: 1.4;
}

.ack input {
  margin-top: 3px;
}

/* ===== Actions ===== */
.login-actions {
  position: absolute;
  bottom: 32px;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.login-actions a {
  font-size: 14px;
  color: #1a73e8;
  text-decoration: none;
}

.login-actions button {
  height: 42px;
  padding: 0 28px;
  border-radius: 22px;
  border: none;
  background: #1a73e8;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

.login-actions button:hover {
  background: #1765cc;
}

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .login-actions {
    position: static;
    justify-content: flex-end;
    margin-top: 32px;
  }
}
