/* style.css */
:root {
  --cream: #faf7f2;
  --ink: #1a1814;
  --ink-light: #5a5650;
  --ink-faint: #9a9590;
  --gold: #c9a84c;
  --gold-light: #f5e9c8;
  --red: #c0392b;
  --green: #27ae60;
  --border: #e8e2d9;
  --card-bg: #ffffff;
  --shadow: 0 2px 12px rgba(26,24,20,0.08);
  --shadow-lg: 0 8px 32px rgba(26,24,20,0.12);
  --radius: 10px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Auth ────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #faf7f2 0%, #f0ebe0 100%);
}

.auth-wrapper { width: 100%; max-width: 420px; padding: 24px; }

.auth-brand { text-align: center; margin-bottom: 32px; }

.brand-icon { font-size: 32px; color: var(--gold); display: block; margin-bottom: 8px; }

.brand-name {
  font-family: 'Lora', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.brand-tagline {
  color: var(--ink-faint);
  font-size: 14px;
  margin-top: 4px;
  font-style: italic;
  font-family: 'Lora', serif;
}

.auth-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-card h2 { font-family: 'Lora', serif; font-size: 22px; margin-bottom: 24px; }

.auth-switch { text-align: center; margin-top: 20px; color: var(--ink-light); font-size: 14px; }
.auth-switch a { color: var(--gold); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand:hover { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { color: var(--ink-faint); font-size: 14px; }

/* ── Main ────────────────────────────────────────── */
.main-content { max-width: 860px; margin: 0 auto; padding: 40px 24px; }

/* ── Dashboard ───────────────────────────────────── */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-family: 'Lora', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.page-subtitle { color: var(--ink-faint); font-size: 14px; margin-top: 4px; }

.entries-grid { display: grid; gap: 16px; }

.entry-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}

.entry-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.entry-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.entry-mood { font-size: 20px; }
.entry-date { font-size: 12px; color: var(--ink-faint); }

.entry-title {
  font-family: 'Lora', serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.entry-preview { color: var(--ink-light); font-size: 14px; line-height: 1.6; }

.empty-state { text-align: center; padding: 80px 24px; color: var(--ink-light); }
.empty-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-family: 'Lora', serif; font-size: 20px; margin-bottom: 8px; color: var(--ink); }
.empty-state p { margin-bottom: 24px; }

/* ── Entry Form ──────────────────────────────────── */
.form-page { max-width: 680px; }

.form-header { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }

.back-link { color: var(--ink-light); text-decoration: none; font-size: 14px; transition: color 0.15s; }
.back-link:hover { color: var(--gold); }

.entry-form { display: flex; flex-direction: column; gap: 20px; }

.mood-picker { display: flex; gap: 10px; flex-wrap: wrap; }

.mood-label { cursor: pointer; }
.mood-label input { display: none; }

.mood-label span {
  display: block;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  transition: all 0.15s;
  color: var(--ink-light);
  background: white;
  text-transform: capitalize;
}

.mood-label input:checked + span {
  border-color: var(--gold);
  background: var(--gold-light);
  color: var(--ink);
  font-weight: 500;
}

.mood-label:hover span { border-color: var(--gold); background: var(--gold-light); }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }

/* ── View Entry ──────────────────────────────────── */
.view-entry { max-width: 680px; }

.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.view-actions { display: flex; gap: 10px; }

.entry-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.entry-mood-large { font-size: 26px; }
.entry-date-full { font-size: 14px; color: var(--ink-faint); font-style: italic; font-family: 'Lora', serif; }

.entry-title-large {
  font-family: 'Lora', serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  line-height: 1.3;
}

.entry-body { font-size: 16px; line-height: 1.9; color: var(--ink-light); font-family: 'Lora', serif; }

/* ── Forms ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

textarea { resize: vertical; min-height: 200px; line-height: 1.7; }

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

.btn-primary { background: var(--ink); color: white; border-color: var(--ink); }
.btn-primary:hover { background: #2d2a24; border-color: #2d2a24; }

.btn-ghost { background: transparent; color: var(--ink-light); border-color: var(--border); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--ink-light); }

.btn-danger { background: transparent; color: var(--red); border-color: #e8c0bc; }
.btn-danger:hover { background: #fdf0ee; }

.btn-full { width: 100%; }

/* ── Alerts ──────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; }
.alert-error { background: #fdf0ee; color: var(--red); border: 1px solid #e8c0bc; }
.alert-success { background: #edf8f1; color: var(--green); border: 1px solid #b8e0c6; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .main-content { padding: 24px 16px; }
  .auth-card { padding: 24px; }
  .dashboard-header { flex-direction: column; gap: 16px; align-items: stretch; }
  .view-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .entry-title-large { font-size: 24px; }
  .form-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
