* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f7fbff;
  --panel: #ffffff;
  --text: #172033;
  --muted: #5b677a;
  --line: #d8e3ef;
  --primary: #0f8fd6;
  --primary-dark: #0876b4;
  --accent: #21a67a;
  --danger: #c2414b;
  --shadow: 0 22px 70px rgba(23, 32, 51, 0.11);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 10%, rgba(33, 166, 122, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 16%, rgba(15, 143, 214, 0.16), transparent 24rem),
    linear-gradient(135deg, #f8fbff 0%, #eef7fb 46%, #ffffff 100%);
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.auth-card,
.top-panel {
  width: min(100%, 440px);
  border: 1px solid rgba(216, 227, 239, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-card {
  padding: 32px;
}

.top-panel {
  width: min(100%, 760px);
  padding: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 18px;
  padding: 0 10px;
  border: 1px solid #bfe7da;
  border-radius: 999px;
  color: #087657;
  background: #ecfbf5;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

.top-panel h1 {
  font-size: clamp(34px, 5vw, 48px);
}

p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: #2d3a4f;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 143, 214, 0.13);
  outline: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

button,
.button-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--primary-dark);
}

button.secondary {
  color: #0d628f;
  background: #ffffff;
}

button.secondary:hover {
  background: #f1f8fc;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.message {
  min-height: 24px;
  margin-top: 16px;
  color: var(--danger);
  font-weight: 700;
}

.message.success {
  color: #087657;
}

.user-meta {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.meta-label {
  min-width: 96px;
  color: var(--muted);
  font-weight: 700;
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 560px) {
  .auth-card,
  .top-panel {
    padding: 26px 20px;
  }

  .button-row,
  button,
  .button-link {
    width: 100%;
  }
}
