/* Nikki Sits and Stays — CRM design system
   Warm, friendly, pet-business palette with a clean admin console feel. */

:root {
  --cream: #FBF6EE;
  --paper: #FFFFFF;
  --ink: #2B2420;
  --ink-soft: #6B6058;
  --ink-faint: #A79C90;
  --line: #EBE1D2;
  --line-soft: #F2EADC;

  --terracotta: #D9714B;
  --terracotta-dark: #B85A38;
  --terracotta-tint: #FBEAE0;

  --teal: #2F7A72;
  --teal-dark: #235D56;
  --teal-tint: #E4F1EE;

  --gold: #E3A93B;
  --gold-tint: #FBF0DA;

  --red: #C4483A;
  --red-tint: #FBE7E4;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(43, 36, 32, 0.06);
  --shadow: 0 6px 20px rgba(43, 36, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(43, 36, 32, 0.14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 0.4em 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em 0; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
small { color: var(--ink-soft); }
hr { border: none; border-top: 1px solid var(--line); margin: 1.5em 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 0.92rem;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .05s ease, opacity .15s ease, background .15s ease;
  background: var(--paper); color: var(--ink);
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-faint); background: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: 6px 13px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards & surfaces ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.panel-title h2, .panel-title h3 { margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-sidebar { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Badges / tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em;
}
.badge-terracotta { background: var(--terracotta-tint); color: var(--terracotta-dark); }
.badge-teal { background: var(--teal-tint); color: var(--teal-dark); }
.badge-gold { background: var(--gold-tint); color: #8a6512; }
.badge-red { background: var(--red-tint); color: var(--red); }
.badge-gray { background: var(--line-soft); color: var(--ink-soft); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 16px; }
.field small.hint { display: block; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=time], input[type=url],
textarea, select {
  width: 100%; font: inherit; font-size: 0.95rem; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; font-weight: 500; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > .field { flex: 1; min-width: 160px; }
.error-text { color: var(--red); font-size: 0.85rem; margin-top: 4px; }
.form-error-banner {
  background: var(--red-tint); color: var(--red); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px; font-size: 0.9rem; font-weight: 600;
}
.form-success-banner {
  background: var(--teal-tint); color: var(--teal-dark); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px; font-size: 0.9rem; font-weight: 600;
}

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-soft); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--cream); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty-state h3 { color: var(--ink); }

/* ---------- Top nav (public site) ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand .paw { font-size: 1.4rem; }
.brand-logo { height: 40px; width: auto; display: block; }
.hero {
  background: linear-gradient(160deg, var(--terracotta-tint) 0%, var(--cream) 55%);
  padding: 56px 0 40px;
}
.hero h1 { font-size: 2.3rem; max-width: 640px; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 560px; }
.document-body { line-height: 1.7; padding: 16px 0; }
.hero-grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero-grid > div:first-child { flex: 1 1 420px; }
.hero-image { flex: 0 1 380px; width: 100%; max-width: 380px; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 232px; flex-shrink: 0; background: var(--ink); color: #F4EEE6;
  display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { color: #fff; padding: 0 8px 20px; font-size: 1.05rem; }
.admin-sidebar .brand small { display: block; color: #C9BEB0; font-weight: 400; font-size: 0.72rem; margin-top: 2px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.admin-nav a {
  color: #D8CFC3; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
}
.admin-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; color: #fff; }
.admin-nav a.active { background: var(--terracotta); color: #fff; }
.admin-sidebar .spacer { flex: 1; }
.admin-sidebar .booking-link-box {
  background: rgba(255,255,255,0.06); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; font-size: 0.78rem; color: #D8CFC3;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.admin-content { padding: 26px 28px 60px; max-width: 1180px; }
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-sidebar .spacer { display: none; }
}

/* ---------- Calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.cal-toolbar .cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 4px; }
.cal-day {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
}
.cal-day:hover { border-color: var(--teal); }
.cal-day.other-month { opacity: 0.35; }
.cal-day.today { border-color: var(--terracotta); box-shadow: 0 0 0 1px var(--terracotta); }
.cal-day .day-num { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.cal-day.today .day-num { color: var(--terracotta-dark); }
.cal-chip {
  font-size: 0.68rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cal-chip.chip-confirmed { background: var(--teal-tint); color: var(--teal-dark); }
.cal-chip.chip-requested { background: var(--gold-tint); color: #8a6512; }
.cal-chip.chip-blocked { background: var(--line-soft); color: var(--ink-soft); }
.cal-chip.chip-completed { background: #EEF1EA; color: #4B5E3C; }
.cal-chip.chip-cancelled { background: var(--red-tint); color: var(--red); text-decoration: line-through; }
.cal-day .more-link { font-size: 0.68rem; color: var(--ink-faint); font-weight: 600; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.slot-btn {
  border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 10px 6px;
  font-weight: 700; font-size: 0.85rem; cursor: pointer; text-align: center;
}
.slot-btn:hover { border-color: var(--teal); background: var(--teal-tint); }
.slot-btn.selected { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Misc ---------- */
.muted { color: var(--ink-soft); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.stat-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat-tile .stat-value { font-size: 1.7rem; font-weight: 800; }
.stat-tile .stat-label { font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.avatar-circle {
  width: 40px; height: 40px; border-radius: 50%; background: var(--terracotta-tint); color: var(--terracotta-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem; flex-shrink: 0;
}
.dog-avatar { background: var(--teal-tint); color: var(--teal-dark); }
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab-bar a { padding: 10px 4px; margin-right: 18px; font-weight: 700; font-size: 0.88rem; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.tab-bar a.active { color: var(--ink); border-color: var(--terracotta); }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(43,36,32,0.45); display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px;
  max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto;
}
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 0.88rem; z-index: 200;
  opacity: 0; transform: translateY(8px); transition: all .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; }
.pill-nav { display: flex; gap: 6px; background: var(--line-soft); padding: 4px; border-radius: 999px; width: fit-content; }
.pill-nav a { padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; color: var(--ink-soft); }
.pill-nav a.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.timeline { border-left: 2px solid var(--line); padding-left: 18px; margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal); border: 2px solid var(--paper);
}
footer.site-footer { padding: 40px 0; text-align: center; color: var(--ink-faint); font-size: 0.85rem; }
