/* Bouncy Beans Soft Play — shared styles */

:root {
  --brand: #ff6fa3;          /* pink */
  --brand-dark: #e0477e;
  --accent: #5cc4ff;         /* soft blue */
  --bg: #fff7fb;
  --surface: #ffffff;
  --text: #2a2a35;
  --muted: #6b6b78;
  --border: #eadfe4;
  --ok: #2ea55a;
  --warn: #c8822c;
  --err: #c83a3a;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(255, 111, 163, 0.08);
  --shadow-lg: 0 10px 30px rgba(255, 111, 163, 0.15);
}

* { box-sizing: border-box; }

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

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.header .subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

h1, h2, h3 { line-height: 1.25; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.card h2 { margin-top: 0; font-size: 20px; }

/* Form elements */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,111,163,0.15);
}

textarea { min-height: 80px; resize: vertical; }

.row { display: grid; gap: 14px; margin-bottom: 14px; }
.row.two  { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) {
  .row.two, .row.three { grid-template-columns: 1fr; }
}

.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--brand);
}
.btn.secondary:hover { background: #fff0f6; }
.btn.ghost {
  background: transparent;
  color: var(--muted);
}
.btn.block { display: block; width: 100%; }
.btn.large { padding: 14px 24px; font-size: 16px; }

/* Item picker (admin) */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.item-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  background: #fff;
}
.item-card:hover { border-color: var(--brand); }
.item-card.selected {
  border-color: var(--brand);
  background: #fff5f9;
  box-shadow: 0 0 0 2px rgba(255,111,163,0.25) inset;
}
.item-card .title { font-weight: 700; font-size: 15px; }
.item-card .sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.item-card .price { font-weight: 700; color: var(--brand-dark); }
.item-card ul {
  margin: 8px 0 0 16px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}
.item-card ul li { margin-bottom: 2px; }

/* Summary table (client sign page) */
.summary-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.summary-table th, .summary-table td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.summary-table th { color: var(--muted); font-weight: 600; }
.summary-table td.right, .summary-table th.right { text-align: right; }
.summary-table tfoot td { font-weight: 700; border-bottom: 0; padding-top: 12px; }

/* Agreement */
.agreement {
  max-height: 420px;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffafc;
  font-size: 14px;
}
.agreement h3 {
  font-size: 14px;
  margin: 16px 0 6px;
  color: var(--brand-dark);
}
.agreement h3:first-child { margin-top: 0; }
.agreement p { margin: 6px 0; }
.agreement ul { margin: 6px 0 10px 18px; padding: 0; }
.agreement li { margin-bottom: 4px; }

/* Signature pad */
.sig-wrap {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fff;
}
.sig-wrap canvas {
  width: 100%;
  height: 180px;
  display: block;
  touch-action: none;
  border-radius: 10px;
}
.sig-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* Status banners */
.banner {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}
.banner.ok  { background: #e8f8ee; color: #1d7a3e; border: 1px solid #b8e5c7; }
.banner.err { background: #fde8e8; color: #992424; border: 1px solid #f0bcbc; }
.banner.info { background: #e6f3fc; color: #1a5482; border: 1px solid #bcdbee; }

/* Link result block on admin */
.result-link {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f6f0f4;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
}

/* Hidden until JS enables */
.hidden { display: none !important; }
