:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1a2230;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0f766e;
  --accent-hover: #0d5f58;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --ok: #166534;
  --ok-bg: #f0fdf4;
  --r: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

h1 {
  font-size: 19px;
  margin: 0 0 6px;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button.primary {
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button.primary:hover { background: var(--accent-hover); }

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #bbf7d0;
}

.foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --card: #171e2c;
    --text: #e7ecf3;
    --muted: #94a3b8;
    --border: #2a3446;
    --danger-bg: #3a1414;
    --ok-bg: #10261a;
  }
  input[type="text"], input[type="email"], input[type="password"] {
    background: #0f1420;
    color: var(--text);
  }
}
