:root {
  --denim: #1c58d9;
  --denim-dark: #1a4fb8;
  --ink: #3f4350;
  --ink-light: #5d6069;
  --border: #d1d4db;
  --bg: #ffffff;
  --danger: #d24b4e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

a { color: var(--denim); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  user-select: none;
}

.brand svg { display: block; }

.brand-name {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.card {
  width: 100%;
  max-width: 340px;
}

.card h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 24px;
  text-align: center;
  color: var(--ink);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.field input:focus {
  border-color: var(--denim);
  box-shadow: 0 0 0 1px var(--denim);
}

.btn {
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border: none;
  border-radius: 4px;
  background: var(--denim);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s ease;
}

.btn:hover { background: var(--denim-dark); }
.btn:disabled { opacity: .65; cursor: default; }

.link-row {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

.note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #eceef1;
  font-size: 12px;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.5;
}

footer {
  flex-shrink: 0;
  padding: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-light);
}

.alert {
  display: none;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.alert.error {
  display: block;
  background: #fdf3f3;
  border: 1px solid #f0c2c2;
  color: var(--danger);
}

.alert.info {
  display: block;
  background: #f2f6fd;
  border: 1px solid #c9d9f5;
  color: #274b8f;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn.loading .spinner { display: inline-block; }

.hidden { display: none !important; }
