:root {
  --leaf: #14532d;
  --leaf-dark: #0d3b20;
  --marigold: #f5a623;
  --paper: #fdf8f0;
  --card: #ffffff;
  --ink: #2b2b26;
  --muted: #8a8578;
  --border: #e8e1d0;

  --free-ink: #1f9d55;
  --free-bg: #e6f4ea;
  --booked-ink: #6b6a63;
  --booked-bg: #e5e3dc;
  --hold-ink: #ad6f11;
  --hold-bg: #fdf0d9;

  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 43, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Kannada",
    "Noto Sans Devanagari", sans-serif;
  line-height: 1.4;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.bilingual {
  display: block;
  font-size: 0.72em;
  color: var(--muted);
  font-weight: 400;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--leaf);
  color: #fff;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.topbar .brand .bilingual {
  color: #d7e9db;
}

/* ── stat strip ───────────────────────────── */
.stat-strip {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.stat-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.stat-card .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--leaf);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── alert ────────────────────────────────── */
.alert {
  background: var(--hold-bg);
  border: 1px solid #f0c98a;
  color: var(--hold-ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.alert .alert-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.alert .alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(173, 111, 17, 0.15);
}

.alert .alert-row:first-of-type {
  border-top: none;
}

.alert-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm.confirm {
  background: var(--leaf);
  color: #fff;
}

.btn-sm.release {
  background: #fff;
  color: var(--hold-ink);
  border: 1px solid var(--hold-ink);
}

/* ── calendar ─────────────────────────────── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
}

.cal-header h2 {
  font-size: 1.05rem;
  margin: 0;
}

.cal-nav {
  display: flex;
  gap: 8px;
}

.cal-nav button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
}

.cal-legend {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.free {
  background: var(--free-ink);
}

.dot.hold {
  background: var(--hold-ink);
}

.dot.booked {
  background: var(--booked-ink);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding-bottom: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--ink);
}

.cal-cell.empty {
  visibility: hidden;
  cursor: default;
}

.cal-cell.free {
  background: var(--free-bg);
  color: var(--free-ink);
}

.cal-cell.hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
}

.cal-cell.booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
}

.cal-cell.today {
  border-color: var(--marigold);
  font-weight: 700;
}

.cal-cell.past {
  opacity: 0.45;
  cursor: default;
}

/* ── sheet ────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 38, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.sheet-backdrop.open {
  display: flex;
}

.sheet {
  background: var(--paper);
  width: 100%;
  max-width: 640px;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 28px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.sheet h3 {
  margin: 0 0 4px;
}

.sheet .sheet-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.status-options {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.status-opt {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-opt.selected.free {
  background: var(--free-bg);
  color: var(--free-ink);
  border-color: var(--free-ink);
}

.status-opt.selected.hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
  border-color: var(--hold-ink);
}

.status-opt.selected.booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
  border-color: var(--booked-ink);
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
}

.phone-input,
.password-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.phone-input .phone-prefix {
  padding: 10px 10px 10px 12px;
  color: var(--muted);
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.phone-input input,
.password-input input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: transparent;
}

.phone-input input:focus,
.password-input input:focus {
  outline: none;
}

.password-input .toggle-visibility {
  border: none;
  background: transparent;
  color: var(--leaf);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0 12px;
  cursor: pointer;
}

.diary-footer-action {
  margin-top: 28px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--leaf);
  color: #fff;
}

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

/* ── enquiries ────────────────────────────── */
.enq-list {
  margin-top: 24px;
}

.enq-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.enq-item:first-of-type {
  border-top: none;
}

.enq-item .meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.chip {
  display: inline-block;
  background: var(--free-bg);
  color: var(--free-ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 22px 0 10px;
}

.empty-note {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 12px 0;
}

.loading,
.error-note {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}
