:root {
  --primary: #0f766e;
  --accent: #0f172a;
  --bg: #f4f6f8;
  --card: #fff;
  --danger: #dc2626;
  --ok: #15803d;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--accent); }
body { min-height: 100dvh; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0.2rem 0 0.6rem; line-height: 1.2; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--muted); margin: 0; }
.lead, .muted, .hint { color: var(--muted); }
.wrap { max-width: 980px; margin: 0 auto; padding: 12px 14px 80px; }
.card, .panel, .property, .visit-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: min(420px, 100%); }
.stack, form { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 0.85rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
}
.otp { letter-spacing: 0.4em; font-size: 1.4rem; text-align: center; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 650;
  background: #e2e8f0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-size: 0.85rem; }
.btn.lg { padding: 14px 22px; }
.banner { padding: 10px 12px; border-radius: 12px; }
.banner.error, .alert-red { background: #fee2e2; color: #991b1b; }
.banner.info { background: #ccfbf1; color: #115e59; }
.alert-red { font-weight: 700; padding: 14px 16px; font-size: 1rem; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar.admin { flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a {
  padding: 8px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.counter { font-size: 2rem; font-weight: 800; margin: 0; color: var(--primary); }
.notes {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  white-space: pre-wrap;
  font: inherit;
}
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: 0.75rem; color: var(--muted); }
.cal-cell { min-height: 72px; background: #f8fafc; border-radius: 10px; padding: 4px; }
.cal-cell.empty { background: transparent; }
.cal-cell.today { outline: 2px solid var(--primary); }
.cal-cell .num { font-size: 0.75rem; color: var(--muted); }
.chip {
  display: block; width: 100%; border: 0; color: #fff; border-radius: 6px;
  font-size: 0.65rem; padding: 3px 4px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.visit-card { border-left: 6px solid var(--primary); }
.badge { font-size: 0.75rem; padding: 3px 8px; border-radius: 999px; background: #e2e8f0; }
.badge.valide { background: #dcfce7; color: var(--ok); }
.badge.planifie { background: #fef3c7; color: #92400e; }
.access-box {
  background: #fff7ed; color: #7c2d12; padding: 14px 16px; border-bottom: 1px solid #fed7aa;
}
.access-list { list-style: none; margin: 0; padding: 0; }
.access-list li {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  align-items: center; padding: 10px 0; border-top: 1px solid #fed7aa;
}
.access-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.access-actions form { flex-direction: row; width: auto; }
.preauth { margin-top: 12px; max-width: 420px; }
.rate-client { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.actions .grow { flex: 1 1 220px; }
.inline { display: flex; gap: 8px; align-items: center; }
.rate-row {
  display: grid; grid-template-columns: 1fr 140px auto; gap: 10px;
  align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.fab {
  position: fixed; right: 16px; bottom: 16px; background: var(--accent);
  color: #fff; border: 0; border-radius: 999px; padding: 14px 18px; font-weight: 700;
}
.hidden { display: none !important; }
.gite { font-size: 1.15rem; font-weight: 750; margin: 4px 0; }
.visit-list { list-style: none; padding: 0; }
.price-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 720px) {
  .rate-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 58px; }
}
