/* ============================================================
   Project Map — Universal Login
   login.buildprojectmap.com
   Premium, neutral, isolated styles. No dependency on app styles.
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --bg: #1A1A17;
  --bg-soft: #232320;
  --surface: #FAF9F6;
  --surface-2: #F1EFEA;
  --ink: #1A1A17;
  --ink-soft: #4A4A45;
  --ink-muted: #7A7770;
  --line: #E5E1D8;
  --line-strong: #C9C3B6;
  --accent: #1A1A17;
  --accent-hover: #2D2D29;
  --danger: #B0392B;
  --success: #4A6B3F;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 12px 40px rgba(26, 26, 23, 0.08);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(26,26,23,0.05), transparent 60%),
    linear-gradient(180deg, #FAF9F6 0%, #F4F1EA 100%);
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-card);
  animation: fadeUp 280ms cubic-bezier(.2,.7,.2,1) both;
}

.card.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

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

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand .mark svg { display: block; }

.brand-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.subtitle .mono {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-soft);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field .label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:hover { border-color: var(--line-strong); }

.field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26,26,23,0.08);
}

.error {
  min-height: 0;
  font-size: 13px;
  color: var(--danger);
  line-height: 1.4;
  margin: 4px 0 0;
}

.error:not(:empty) {
  margin: 6px 0 12px;
  padding: 10px 12px;
  background: #FBEDEA;
  border: 1px solid #F2CFC9;
  border-radius: var(--radius-sm);
}

.success {
  font-size: 13px;
  color: var(--success);
  line-height: 1.4;
}

.success:not(:empty) {
  margin: 6px 0 12px;
  padding: 10px 12px;
  background: #EEF3EB;
  border: 1px solid #CFDDC6;
  border-radius: var(--radius-sm);
}

.btn {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  position: relative;
}

.btn.primary {
  background: var(--accent);
  color: #FAF9F6;
}

.btn.primary:hover:not([disabled]) { background: var(--accent-hover); }
.btn.primary:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(250, 249, 246, 0.35);
  border-top-color: #FAF9F6;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

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

.links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}

.links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}

.links a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.links .dot { color: var(--line-strong); }

.foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .card { padding: 28px 22px 22px; border-radius: 12px; }
  .title { font-size: 20px; }
}
