:root {
  --navy: #0b1f3a;
  --blue: #1f6bff;
  --blue-dark: #1554d1;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #16233b;
  --muted: #5d6b84;
  --line: #e3e8f2;
  --green: #14805e;
  --red: #c0392b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 64px; }
.wrap.wide { max-width: 1100px; }

header.brandbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brandbar .logo { font-weight: 800; letter-spacing: 0.3px; font-size: 18px; }
.brandbar .logo span { color: var(--blue); }
.brandbar .shopname { font-size: 14px; opacity: 0.85; }

.hero { text-align: center; padding: 28px 8px 8px; }
.hero h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.3px; }
.hero p { color: var(--muted); margin: 0; font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(11, 31, 58, 0.05);
}

label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 5px; }
label:first-child { margin-top: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }

input[type="text"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 107, 255, 0.15);
}
textarea { min-height: 90px; resize: vertical; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 18px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn.small { width: auto; padding: 8px 14px; font-size: 13.5px; margin-top: 0; }

/* photo uploader */
.photo-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 22px 14px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 14.5px;
}
.photo-drop strong { color: var(--blue); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs .thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* slot picker */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-top: 4px; }
.day-pill {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.day-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.slot {
  padding: 10px 6px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.slot.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.consent input { margin-top: 3px; width: 18px; height: 18px; }

.success { text-align: center; padding: 36px 12px; }
.success .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: 34px; line-height: 64px;
  margin: 0 auto 16px;
}
.error-msg { color: var(--red); font-size: 14px; margin-top: 10px; font-weight: 600; }
.muted { color: var(--muted); }
.services { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.services .tag {
  background: #e9f0ff; color: var(--blue-dark);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600;
}

/* ---- admin ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f0f4fb; }

.status-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.status-new { background: #fff3d6; color: #8a6100; }
.status-booked { background: #e2f0ff; color: #1554d1; }
.status-contacted { background: #e8e3ff; color: #5b3fd4; }
.status-showed { background: #dcf5ea; color: #14805e; }
.status-sold { background: #14805e; color: #fff; }
.status-dead { background: #f0f0f0; color: #888; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 18px 0 10px; }
.toolbar select { width: auto; padding: 8px 12px; font-size: 14px; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 30px rgba(11,31,58,0.12);
  padding: 24px;
  overflow-y: auto;
  z-index: 50;
}
.drawer h2 { margin-top: 0; }
.drawer .close { float: right; cursor: pointer; font-size: 22px; color: var(--muted); background: none; border: none; }
.detail-grid { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 14px; margin: 14px 0; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 600; }
.lead-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.lead-photos img { width: 130px; height: 130px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.pipeline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pipeline button {
  padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pipeline button.current { background: var(--navy); color: #fff; border-color: var(--navy); }

.login-box { max-width: 380px; margin: 80px auto; }
.stat-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 120px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .num { font-size: 26px; font-weight: 800; }
.stat .lbl { font-size: 12.5px; color: var(--muted); }

@media (max-width: 480px) {
  .slots { grid-template-columns: repeat(2, 1fr); }
  .row { flex-direction: column; gap: 0; }
}
