@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #f4f0ea;
  --muted: rgba(244, 240, 234, 0.72);
  --line: rgba(255, 255, 255, 0.26);
  --panel: rgba(53, 56, 61, 0.26);
  --panel-edge: rgba(255, 255, 255, 0.34);
  --field: rgba(24, 26, 30, 0.38);
  --accent: #b10d1c;
  --accent-dark: #8f101b;
  --danger: #ff9b9b;
  --shadow: 0 32px 85px rgba(0, 0, 0, 0.48);
  --radius: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  overflow: hidden;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.38), rgba(8, 10, 13, 0.52)),
    url("/assets/login-gym-photo.jpg") center center / cover no-repeat,
    linear-gradient(180deg, #23262c 0%, #16181c 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 251, 228, 0.16), transparent 12%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%);
  opacity: 1;
}

body::after {
  background:
    radial-gradient(circle at center, transparent 22%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
}

.login-card {
  position: relative;
  padding: 44px 40px 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.12), transparent 34%);
  box-shadow:
    inset 0 1px 0 var(--panel-edge),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.login-logo {
  width: 240px;
  height: 240px;
  object-fit: contain;
  margin-bottom: 6px;
  background: transparent;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14));
}

h1 {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.portal-label {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 30px;
  text-align: left;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
}

.field input {
  width: 100%;
  min-height: 58px;
  padding: 15px 18px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--field);
  color: #ffffff;
  font-size: 1rem;
  backdrop-filter: blur(12px);
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.login-error {
  min-height: 24px;
  color: var(--danger);
  font-size: 0.92rem;
  text-align: center;
}

.primary-button {
  min-height: 58px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0;
  color: #fff8f4;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow:
    0 14px 26px rgba(112, 7, 19, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-link {
  display: inline-flex;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  .login-card {
    padding: 34px 22px 24px;
    border-radius: 28px;
  }

  .login-logo {
    width: 190px;
    height: 190px;
  }

  h1 {
    font-size: clamp(2rem, 8.3vw, 2.7rem);
  }
}
