@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f5efe3;
  --surface: #fffaf1;
  --ink: #1f2a24;
  --ink-2: #55615a;
  --ink-3: #8a938d;
  --line: #e3d9c6;
  --green: #2f6b4f;
  --green-2: #245640;
  --green-soft: #dfeadf;
  --amber: #c9822b;
  --amber-soft: #f6e3c6;
  --red: #b23b2e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 6px 20px rgba(31, 42, 36, .06);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600;
  background: var(--green); color: #fff; transition: transform .06s, background .15s;
}
.btn:hover { background: var(--green-2); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #e8c3be; }
.btn:disabled { opacity: .5; cursor: default; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(400px, 100%); padding: 32px; }
.login h1 { font-size: 28px; margin-bottom: 4px; }
.login form { display: grid; gap: 14px; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date] {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; font-size: 16px; width: 100%;
}
input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.error { color: var(--red); font-size: 14px; min-height: 1.2em; }

.demo-banner {
  background: var(--amber-soft); color: #6b4416; font-size: 13px; text-align: center; padding: 6px 12px;
}

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .mark { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .04em; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 12px 12px 18px;
  display: flex; gap: 14px; align-items: center; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.err { background: var(--red); }
.toast button { background: rgba(255,255,255,.16); border: 0; color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(31,42,36,.45); display: grid; place-items: center; padding: 20px; z-index: 40; }
.modal { width: min(480px, 100%); padding: 26px; max-height: calc(100vh - 40px); overflow: auto; }
.modal h2 { font-size: 24px; margin-bottom: 16px; }
.modal form { display: grid; gap: 14px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
