/* ------------------------------------------------------------------
   Shared styles. Edit the variables below to re-theme the whole site.
   ------------------------------------------------------------------ */
:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #1f2333;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #059669;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 8px 24px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

/* Header / nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav .brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.nav .brand span { color: var(--brand); }
.nav .links { display: flex; gap: 1.25rem; align-items: center; }
.nav .links a { color: var(--muted); font-weight: 500; }
.nav .links a:hover { color: var(--text); text-decoration: none; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
.narrow { max-width: 440px; }

/* Hero */
.hero { text-align: center; padding: 4rem 1.5rem 3rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 auto 2rem; }

/* Feature cards */
.features { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.5rem; }
.card p { margin: 0; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--border); }
.btn.ghost:hover { background: #f3f4f6; }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--border); }
.btn.danger:hover { background: #fef2f2; }

/* Forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.panel h1, .panel h2 { margin-top: 0; }
label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; font-size: 0.9rem; }
input, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; }
.form-footer { margin-top: 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Messages */
.msg { padding: 0.7rem 1rem; border-radius: 10px; margin: 1rem 0; font-size: 0.95rem; display: none; }
.msg.error { display: block; background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.msg.success { display: block; background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }

/* Dashboard */
.dash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--brand); }
.stat .lbl { color: var(--muted); font-size: 0.9rem; }

.item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.item .title { font-weight: 600; }
.item .note { color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; white-space: pre-wrap; }
.item .date { color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }

footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: 0.9rem; }
