/* iMassage rebuild · Phase 1 minimal CSS · No build step. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f9;
  --text: #1a1a1f;
  --muted: #6b6b7c;
  --line: #e3e3eb;
  --accent: #1c5cff;
  --accent-text: #ffffff;
  --success: #15803d;
  --success-bg: #dcfce7;
  --error: #b91c1c;
  --error-bg: #fee2e2;
  --info: #1e3a8a;
  --info-bg: #dbeafe;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif;
}

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

.muted { color: var(--muted); font-size: 0.95rem; }

/* ===== Layout ===== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.site-header .brand { font-weight: 700; font-size: 18px; color: var(--text); }
.site-header nav { display: flex; gap: 16px; align-items: center; }
.site-header .who { color: var(--muted); font-size: 14px; }

.site-main { max-width: 1024px; margin: 32px auto; padding: 0 24px; }

.site-footer {
  margin-top: 64px;
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* ===== Auth pages ===== */

.auth-card {
  max-width: 420px;
  margin: 64px auto;
  padding: 32px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 8px; font-size: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-card label { font-weight: 600; font-size: 14px; }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font: inherit;
}
.auth-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-card .hint { color: var(--muted); font-size: 13px; margin: -8px 0 0; }

.auth-card .social-login { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-card .social-login a { margin-right: 12px; }

/* ===== Buttons ===== */

button.primary,
.primary-link {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
button.primary:hover,
.primary-link:hover { filter: brightness(1.05); text-decoration: none; }
.primary-link { color: var(--accent-text); }

button.link-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
button.link-button:hover { text-decoration: underline; }

/* ===== Alerts ===== */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 12px;
}
.alert-error   { color: var(--error);   background: var(--error-bg); }
.alert-success { color: var(--success); background: var(--success-bg); }
.alert-info    { color: var(--info);    background: var(--info-bg); }

/* ===== Settings page ===== */

.page-admin { max-width: 980px; margin: 0 auto; }
.page-admin h1 { margin: 0 0 8px; font-size: 24px; }

.settings-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
}
.settings-group legend { font-weight: 700; padding: 0 8px; }

.setting-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.setting-row:first-of-type { border-top: 0; }

.setting-row label { display: block; font-weight: 600; }
.setting-key { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-secret { background: #fef3c7; color: #854d0e; }
.badge-set    { background: var(--success-bg); color: var(--success); }
.badge-empty  { background: var(--bg-alt); color: var(--muted); }

.setting-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.setting-form input[type="text"],
.setting-form input[type="password"] {
  flex: 1 1 320px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font: inherit;
}

.test-result[data-ok="yes"] { color: var(--success); }
.test-result[data-ok="no"]  { color: var(--error); }

.cli-list { padding-left: 20px; }
.cli-list code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.cli-list code.copied::after { content: ' ✓'; color: var(--success); }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 8px;
}
.audit-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.audit-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.audit-table tr:last-child td { border-bottom: 0; }
.audit-table code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

/* ===== Reveal dialog ===== */

dialog#reveal-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 380px;
  box-shadow: var(--shadow);
}
dialog#reveal-dialog h2 { margin: 0 0 8px; font-size: 18px; }
dialog#reveal-dialog input { width: 100%; padding: 10px 12px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); }
dialog#reveal-dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 12px 0 0; }
.reveal-result { font-family: "SF Mono", Menlo, Consolas, monospace; word-break: break-all; }
.reveal-result[data-ok="no"] { color: var(--error); font-family: inherit; }

/* ===== Home ===== */

.home-hero { padding: 48px 16px; text-align: center; }
.home-hero h1 { font-size: 32px; margin: 0 0 8px; }

/* ===== Customer pages ===== */

.page-customer { max-width: 980px; margin: 0 auto; }
.page-customer h1 { margin: 0 0 8px; font-size: 24px; }

.empty-state { padding: 32px; background: var(--bg-alt); border-radius: var(--radius); text-align: center; }

.store-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.store-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.store-card .store-cover { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; }
.store-card .store-name { font-size: 18px; margin: 0 0 4px; }
.store-card .store-address { font-size: 13px; }

.store-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.store-section legend { font-weight: 700; padding: 0 8px; }

.therapist-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.therapist-list li { background: var(--bg-alt); border-radius: var(--radius); padding: 12px; min-width: 200px; }
.therapist-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }

.slot-list { list-style: none; padding: 0; }
.slot-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt);
}
.slot-time { font-weight: 700; font-family: "SF Mono", Menlo, Consolas, monospace; min-width: 64px; }
.slot-therapist { flex: 1; }

.booking-summary { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 16px 0; }
.booking-summary dt { color: var(--muted); font-size: 14px; }
.booking-summary dd { margin: 0; font-weight: 500; }

.bookings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bookings-table th { text-align: left; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bookings-table td { padding: 10px; border-bottom: 1px solid var(--line); }

.badge-status-pending   { background: #fef3c7; color: #854d0e; }
.badge-status-confirmed { background: var(--success-bg); color: var(--success); }
.badge-status-completed { background: #e0e7ff; color: #1e3a8a; }
.badge-status-cancelled { background: var(--error-bg); color: var(--error); }
.badge-status-no_show   { background: var(--bg-alt); color: var(--muted); }

textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font: inherit;
  width: 100%;
}
