* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: #2a0d4a;
  background: #ece6f1;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap.wide { max-width: 1100px; }

.app-header {
  text-align: center;
  padding: 30px 20px 6px;
}
.app-header .logo {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 34px;
}
.app-header .logo .n1 { color: #6b1fa3; }
.app-header .logo .n2 { color: #d8a531; }
.app-header .sub {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 3px;
  color: #6b1fa3;
}
.app-header a.home-link { display: inline-block; }

.card {
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid #e6dcf0;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(107,31,163,0.08);
}

h1.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: #341754;
  margin-bottom: 6px;
  text-align: center;
}
p.page-sub {
  text-align: center;
  color: #6a5680;
  font-size: 14px;
  margin-bottom: 26px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: #341754;
  margin-bottom: 6px;
  margin-top: 18px;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="password"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d9cce8;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  color: #2a0d4a;
  background: #fbf9fd;
}
input:focus, textarea:focus { outline: 2px solid #6b1fa3; }
textarea { min-height: 80px; resize: vertical; }

.service-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1.5px solid #e6dcf0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.service-option:hover { border-color: #d8a531; background: #fdf9f0; }
.service-option input { width: auto; margin-top: 3px; }
.service-option .opt-label { font-weight: 600; font-size: 14.5px; color: #341754; }
.service-option .opt-price { font-size: 12.5px; color: #6a5680; margin-top: 2px; }

.whats-included { margin-top: 8px; }
.whats-included summary {
  font-size: 12px;
  font-weight: 600;
  color: #6b1fa3;
  cursor: pointer;
  list-style: none;
  display: inline-block;
}
.whats-included summary::-webkit-details-marker { display: none; }
.whats-included summary::before { content: '▸ '; }
.whats-included[open] summary::before { content: '▾ '; }
.whats-included ul {
  margin: 8px 0 2px 18px;
  font-size: 12px;
  color: #4a2a63;
  line-height: 1.6;
}

.price-box {
  margin-top: 26px;
  background: linear-gradient(165deg, #7b2cb0, #4a1466 65%, #34104d);
  color: #fff;
  border-radius: 14px;
  padding: 20px 22px;
}
.price-box .total-label { font-size: 12px; letter-spacing: 1.5px; color: #d8b8f0; text-transform: uppercase; }
.price-box .total-amount { font-family: 'Playfair Display', serif; font-size: 38px; font-weight: 800; color: #f3d57c; }
.price-box .line-items { margin-top: 12px; font-size: 13px; color: #e9ddf7; }
.price-box .line-items div { display: flex; justify-content: space-between; padding: 3px 0; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid #d8a531;
  background: #6b1fa3;
  color: #fff;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: #59188a; }
.btn.btn-block { display: block; width: 100%; margin-top: 26px; }
.btn.btn-secondary { background: transparent; color: #6b1fa3; border-color: #6b1fa3; }

.error-box {
  background: #fde9e9;
  border: 1.5px solid #e8a3a3;
  color: #8a1f1f;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13.5px;
}
.error-box ul { margin-left: 18px; }

.signature-pad-wrap {
  border: 2px dashed #c9b9da;
  border-radius: 12px;
  margin-top: 10px;
  background: #fbf9fd;
  position: relative;
}
.signature-pad-wrap canvas {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 12px;
  touch-action: none;
}
.signature-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #d9cce8;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  color: #6b1fa3;
}

/* ---------- Admin ---------- */
.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #e6dcf0;
}
.admin-nav .logo { font-family:'Playfair Display',serif; font-weight: 800; font-size: 22px; }
.admin-nav .logo .n1 { color: #6b1fa3; } .admin-nav .logo .n2 { color: #d8a531; }
.admin-nav form { display: inline; }
.admin-nav button.linklike {
  background: none; border: none; color: #6b1fa3; font-weight: 600; font-size: 13.5px; cursor: pointer;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.calendar-toolbar h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: #341754; }
.calendar-toolbar a.nav-btn {
  border: 1.5px solid #6b1fa3; color: #6b1fa3; border-radius: 20px; padding: 6px 16px; font-weight: 600; font-size: 13px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-grid .weekday {
  text-align: center; font-size: 11px; font-weight: 700; color: #6b1fa3; letter-spacing: 1px; padding-bottom: 6px;
}
.calendar-cell {
  background: #fff;
  border: 1.5px solid #e6dcf0;
  border-radius: 10px;
  min-height: 90px;
  padding: 6px;
  font-size: 11.5px;
}
.calendar-cell.empty { background: transparent; border: none; }
.calendar-cell .day-num { font-weight: 700; color: #341754; font-size: 12.5px; }
.job-chip {
  display: block;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.job-chip.pending { background: #fdf3da; color: #8a6a16; border: 1px solid #d8a531; }
.job-chip.confirmed { background: #6b1fa3; color: #fff; }
.job-chip.completed { background: #e6dcf0; color: #6a5680; }
.job-chip.cancelled { background: #f4e4e4; color: #a04545; text-decoration: line-through; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.status-badge.pending { background: #fdf3da; color: #8a6a16; }
.status-badge.confirmed { background: #e8d8f7; color: #6b1fa3; }
.status-badge.completed { background: #e0ece0; color: #2f6b2f; }
.status-badge.cancelled { background: #f4e4e4; color: #a04545; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.detail-grid .field-label { font-size: 11.5px; letter-spacing: 1px; color: #6b1fa3; text-transform: uppercase; font-weight: 700; }
.detail-grid .field-value { font-size: 14.5px; color: #341754; margin-top: 2px; }

@media (max-width: 700px) {
  .detail-grid { grid-template-columns: 1fr; }
  .calendar-cell { min-height: 60px; font-size: 10px; }
}

/* ---------- Print views ---------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
