:root {
  --mbs-primary: #8B6914;
  --mbs-secondary: #D4A853;
  --mbs-dark: #1a1a1a;
  --mbs-light: #f8f5f0;
  --mbs-text: #333333;
  --mbs-muted: #8a8275;
  --mbs-white: #ffffff;
  --mbs-border: #e7e0d3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--mbs-text);
  background: var(--mbs-light);
  line-height: 1.55;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--mbs-dark);
}
.topbar .brand {
  color: var(--mbs-secondary);
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  font-size: 1.05rem;
}
.topbar .logout { color: #cfc6b4; text-decoration: none; font-size: .9rem; }
.topbar .logout:hover { color: #fff; }

.container { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }

h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; color: var(--mbs-dark); }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; color: var(--mbs-primary); }

.muted { color: var(--mbs-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
a { color: var(--mbs-primary); }

.card {
  background: var(--mbs-white);
  border: 1px solid var(--mbs-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card--narrow { max-width: 420px; margin: 48px auto; }
.emoji { font-size: 2.4rem; margin-bottom: 8px; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.stack label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 5px; }
.stack input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--mbs-border);
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
}
.stack input:focus { outline: 2px solid var(--mbs-secondary); border-color: var(--mbs-secondary); }
.input--readonly { background: var(--mbs-light); color: var(--mbs-muted); cursor: default; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 9px;
  padding: 13px 22px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn--primary { background: var(--mbs-primary); color: #fff; }
.btn--primary:hover { background: #745710; }
.btn--ghost { background: transparent; color: var(--mbs-primary); border: 1px solid var(--mbs-primary); }
.btn--ghost:hover { background: var(--mbs-light); }

.greeting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.greeting .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.membership-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge--active { background: #e3f2e3; color: #2e7d32; }
.badge--canceled, .badge--cancelled { background: #f3e3e3; color: #b3261e; }
.badge--warn { background: #fbecd2; color: #8a5a00; }
.badge--credit { background: #f3edda; color: var(--mbs-primary); }

.credit-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.credit-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  padding: 14px 16px;
  background: var(--mbs-light);
  border: 1px solid var(--mbs-border);
  border-radius: 12px;
}
.credit-count { font-size: 1.5rem; font-weight: 700; color: var(--mbs-primary); }
.credit-name { font-size: .78rem; color: var(--mbs-muted); text-align: center; }

.booking-list { list-style: none; margin: 0; padding: 0; }
.booking-list li { padding: 10px 0; border-bottom: 1px solid var(--mbs-border); }
.booking-list li:last-child { border-bottom: none; }
.booking-when { font-weight: 600; font-size: .92rem; }
.booking-what { color: var(--mbs-muted); font-size: .9rem; }
.booking-list--past .booking-when { font-weight: 500; color: var(--mbs-text); }
.booking-deposit { font-size: .85rem; color: var(--mbs-muted); margin-top: 5px; }
.link { font-weight: 600; text-decoration: none; }

.divider { display: flex; align-items: center; text-align: center; color: var(--mbs-muted); margin: 22px 0 4px; font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--mbs-border); }
.divider span { padding: 0 12px; }

.flash { padding: 12px 16px; border-radius: 9px; margin-bottom: 16px; font-size: .92rem; }
.flash-error { background: #f9e4e2; color: #b3261e; }
.flash-success { background: #e3f2e3; color: #2e7d32; }
