* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent: #0a0a0a;
  --accent-hover: #333;
  --error: #d32f2f;
  --ok: #2e7d32;
  --border: #ccc;
  --muted: #666;
}
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #111;
  background: #f6f6f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- top nav ---------- */
.nav {
  background: #0a0a0a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.nav .brand { font-weight: 800; letter-spacing: 2px; font-size: 18px; text-decoration: none; color: #fff; }
.nav ul { list-style: none; display: flex; gap: 22px; }
.nav a { color: #ddd; text-decoration: none; font-size: 14px; }
.nav a:hover { color: #fff; }
.nav .cta { background: #fff; color: #111; padding: 8px 16px; border-radius: 20px; font-weight: 600; }

/* ---------- footer ---------- */
footer {
  margin-top: auto;
  background: #0a0a0a;
  color: #aaa;
  text-align: center;
  padding: 18px;
  font-size: 13px;
}
footer a { color: #ccc; }

/* ---------- generic page content ---------- */
main.page { max-width: 900px; margin: 0 auto; padding: 50px 20px; flex: 1; width: 100%; }
main.page h1 { font-size: 32px; margin-bottom: 16px; }
main.page h2 { font-size: 22px; margin: 28px 0 10px; }
main.page p { line-height: 1.6; color: #333; margin-bottom: 12px; }
.hero {
  background: linear-gradient(135deg, #111 0%, #333 100%);
  color: #fff;
  text-align: center;
  padding: 90px 20px;
}
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero p { color: #ddd; max-width: 600px; margin: 0 auto 24px; }
.hero .btn-main { max-width: 220px; margin: 0 auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 30px; }
.cards .card-item { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.cards .card-item h3 { margin-bottom: 8px; }

/* ---------- auth card (login/signup/forgot) ---------- */
.auth-wrap { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 50px 16px; }
.card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 22px;
  box-shadow: 0 4px 30px rgba(0,0,0,.10);
  padding: 45px 30px 30px;
  display: flex; flex-direction: column; align-items: center;
}
.logo { text-align: center; margin-bottom: 30px; }
.logo .mark {
  width: 56px; height: 56px; border-radius: 50%; background: #111;
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px;
}
.logo .name { display: block; font-weight: 800; letter-spacing: 2px; font-size: 20px; margin-top: 6px; }
.logo .sub { display: block; font-size: 8px; letter-spacing: 4px; margin-top: 2px; color: #777; }

h1.form-title { font-size: 22px; font-weight: 600; text-align: center; margin-bottom: 30px; }

form { width: 100%; }
.field { margin-bottom: 18px; position: relative; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: #444; }
.field label .req { color: var(--error); }
.field input, .field select {
  width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 12px;
  padding: 0 44px 0 14px; font-size: 16px; outline: none; transition: border-color .2s; background: #fff;
}
.field select { padding-right: 14px; }
.field input:focus, .field select:focus { border-color: #111; }
.field.error input { border-color: var(--error); }
.err { color: var(--error); font-size: 12px; margin-top: 4px; min-height: 14px; }
.toggle-pw {
  position: absolute; right: 12px; top: 33px; background: none; border: none;
  cursor: pointer; font-size: 12px; color: #555;
}
.hint { position: absolute; right: 12px; top: 33px; width: 20px; height: 20px; border-radius: 50%;
  background: #777; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: default; }

.btn-main {
  width: 100%; height: 48px; border: none; border-radius: 30px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600;
  text-transform: uppercase; cursor: pointer; transition: background .2s;
}
.btn-main:hover { background: var(--accent-hover); }
.btn-main:disabled { background: #999; cursor: not-allowed; }

.divider { width: 100%; display: flex; align-items: center; gap: 14px; margin: 24px 0; font-size: 14px; color: #777; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #ddd; }

.help { margin-top: 18px; font-size: 14px; text-align: center; }
.help a { color: #111; }
.back-link { align-self: flex-start; background: none; border: none; font-size: 14px; cursor: pointer; margin-bottom: 20px; color: #333; }

.msg { margin-top: 14px; text-align: center; font-size: 14px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--error); }

/* ---------- dashboard ---------- */
.dash-wrap { max-width: 900px; margin: 0 auto; padding: 40px 20px; flex: 1; width: 100%; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dash-header h1 { font-size: 26px; }
.dash-header .logout { background: #fff; border: 1px solid #ccc; border-radius: 20px; padding: 8px 18px; cursor: pointer; font-size: 14px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.panel h2 { font-size: 16px; margin-bottom: 14px; color: #555; text-transform: uppercase; letter-spacing: .5px; }
.profile-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-row span:first-child { color: #777; }
