@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

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

:root {
  --bg:        #F7F7F5;
  --surface:   #EFEEEB;
  --border:    rgba(0,0,0,0.08);
  --border-md: rgba(0,0,0,0.13);
  --text:      #1A1F1B;
  --text-mid:  #4A5C4D;
  --text-dim:  #86A08A;
  --accent:    #27A86E;
  --accent-lt: #D6F0E4;
  --accent-dk: #1A7A4F;
  --dark:      #1E2E21;
  --danger:    #B34040;
  --success:   #27A86E;
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

html { font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

h1, h2, h3 { font-family: 'Lora', serif; font-weight: 500; line-height: 1.3; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* ── Auth forms ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border: 0.5px solid var(--border-md);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.auth-logo {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 28px;
  display: block;
}

.auth-title { font-size: 24px; margin-bottom: 6px; }
.auth-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

/* ── Form elements ──────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-mid); margin-bottom: 6px; }

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--dark);
  color: #F5EFE8;
  width: 100%;
}
.btn-primary:hover { background: #3d332e; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 0.5px solid var(--border-md);
}
.btn-ghost:hover { background: var(--surface); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 0.5px solid rgba(179,64,64,0.3);
}
.btn-danger:hover { background: rgba(179,64,64,0.06); }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(179,64,64,0.08); color: var(--danger); border: 0.5px solid rgba(179,64,64,0.2); }
.alert-success { background: rgba(58,122,90,0.08); color: var(--success); border: 0.5px solid rgba(58,122,90,0.2); }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  height: 58px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
}
.nav-link { font-size: 13.5px; color: var(--text-mid); }
.nav-link:hover { color: var(--text); text-decoration: none; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: white;
  border: 0.5px solid var(--border-md);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

/* ── Phase bar ──────────────────────────────────────────────────────────── */
.phase-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.phase-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-md);
  transition: all 0.3s;
  flex-shrink: 0;
}
.phase-dot.done { background: var(--accent-lt); border: 1px solid var(--accent); }
.phase-dot.active { background: var(--accent); transform: scale(1.2); }
.phase-label { font-size: 11px; color: var(--text-dim); margin-left: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.divider { height: 0.5px; background: var(--border); margin: 20px 0; }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 13px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
