:root {
  --ink: #fff6ee;
  --muted: #e7d3c4;
  --rose: #ff7aa2;
  --cream: #f6e2c0;
  --night: #120c0b;
  --card: #241814;
  --line: rgba(246, 226, 192, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: var(--cream); }

button, input, select, textarea { font: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: calc(0.8rem + env(safe-area-inset-top)) 1rem 0.8rem;
  background: #1a100e;
  border-bottom: 1px solid var(--line);
}

.top strong {
  font-family: var(--serif);
  font-size: 1.5rem;
}

.top a { text-decoration: none; }

.wrap {
  width: min(860px, calc(100% - 1.4rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.login form, .card, .help {
  width: min(100%, 460px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.2rem;
}

.login img { width: 120px; height: auto; margin: 0 auto 0.4rem; display: block; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.6rem;
}

h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
h2 { font-size: 1.8rem; }

.help, .muted { color: var(--muted); }
.help { width: auto; margin: 0 0 1rem; }

.tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

.tabs a {
  flex: 0 0 auto;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: #1a100e;
}

.tabs a.is-on {
  background: var(--rose);
  color: #2a140f;
  border-color: var(--rose);
}

label { display: block; margin: 0.8rem 0 0.3rem; font-weight: 600; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #120c0b;
  color: var(--ink);
}

textarea { min-height: 90px; }

.btn {
  min-height: 48px;
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #2a140f;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.row-actions, .stats { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.stat, .item, .visit {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
}

.stat strong, .item strong { display: block; font-family: var(--serif); font-size: 1.7rem; }

.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 500; }
.check input { width: auto; min-height: 0; }

.error { color: #ffb4c8; }
.ok { color: #d8f3c8; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.45rem 0.3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
