:root {
  --bg:          #F7F5F2;
  --surface:     #FFFFFF;
  --border:      #E5E1DA;
  --border-soft: #EDE9E2;
  --ink:         #1A1916;
  --ink-2:       #6B6860;
  --ink-3:       #A8A49E;
  --accent:      #2D6A4F;
  --accent-light:#E8F5EE;
  --accent-mid:  #74C69D;
  --danger:      #C0392B;
  --danger-light:#FDECEA;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   22px;
  --shadow-md:   0 4px 24px rgba(0,0,0,.08);
  --spring:      cubic-bezier(.34,1.56,.64,1);
}

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

body {
  font-family: 'Geist', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  animation: cardIn .4s cubic-bezier(.4,0,.2,1) both;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.auth-header { margin-bottom: .25rem; }

.auth-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink);
}

.auth-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.auth-header p {
  margin-top: .4rem;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field input {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .65rem .9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  width: 100%;
}

.field input::placeholder { color: var(--ink-3); }

.field input:focus {
  border-color: var(--accent-mid);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(45,106,79,.1);
}

.btn-primary {
  width: 100%;
  padding: .75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45,106,79,.25);
  transition: background .2s, box-shadow .2s, transform .15s var(--spring);
  margin-top: .25rem;
}

.btn-primary:hover {
  background: #245c43;
  box-shadow: 0 4px 14px rgba(45,106,79,.35);
  transform: translateY(-1px);
}

.btn-primary:active  { transform: scale(.98); }
.btn-primary:disabled {
  background: var(--ink-3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  background: var(--danger-light);
  color: var(--danger);
  font-size: 13px;
  padding: .65rem .9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(192,57,43,.15);
  animation: shake .3s var(--spring);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover { text-decoration: underline; }
