:root {
  --page-bg: #f4f6fb;
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-border: rgba(18, 34, 68, 0.08);
  --text-strong: #13294b;
  --text-muted: #5f6f88;
  --input-border: #d8e0ec;
  --input-bg: #ffffff;
  --input-icon-bg: #f7f9fc;
  --input-focus: #4f7cff;
  --brand-accent: #ef476f;
  --brand-accent-hover: #df355f;
  --shadow-soft: 0 24px 48px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius-card: 26px;
  --radius-input: 12px;
  --radius-button: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(circle at top left, rgba(79, 124, 255, 0.08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(239, 71, 111, 0.08), transparent 28%),
    linear-gradient(180deg, #f8faff 0%, var(--page-bg) 100%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 402px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow-card), var(--shadow-soft);
  padding: 28px 30px 34px;
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 26px;
}

.brand-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: contain;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fd 100%);
  padding: 11px;
  box-shadow: inset 0 0 0 1px rgba(19, 41, 75, 0.05);
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.login-form {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-error {
  min-height: 1em;
  margin: -2px 0 0;
  font-size: 0.82rem;
  color: #d12e56;
}

label {
  font-size: 0.98rem;
  font-weight: 700;
}

.input-shell {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  min-height: 58px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-input);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input-shell:focus-within {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
  transform: translateY(-1px);
}

.input-icon {
  width: 48px;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--input-icon-bg);
  border-right: 1px solid var(--input-border);
  color: #6c7d95;
}

.input-icon svg,
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 16px 0 14px;
  font: inherit;
  color: var(--text-strong);
  background: transparent;
}

input::placeholder {
  color: #8b99ae;
}

input[aria-invalid="true"] {
  color: #a61f46;
}

.icon-button {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--input-border);
  background: var(--input-icon-bg);
  color: #6c7d95;
  width: 48px;
  height: 100%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #eef3fb;
  color: var(--text-strong);
  outline: none;
}

.submit-button {
  appearance: none;
  border: 0;
  border-radius: var(--radius-button);
  min-height: 46px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f14d74 0%, var(--brand-accent) 100%);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(239, 71, 111, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: linear-gradient(180deg, #e9436b 0%, var(--brand-accent-hover) 100%);
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(239, 71, 111, 0.28);
  outline: none;
}

.submit-button:active {
  transform: translateY(0);
}

@media (max-width: 560px) {
  .page-shell {
    padding: 18px;
  }

  .login-card {
    width: min(100%, 360px);
    padding: 24px 18px 24px;
    border-radius: 20px;
  }

  .brand-lockup {
    gap: 8px;
    margin-bottom: 22px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }
}
