/* PawTrack CRM — Stylesheet */

*  { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Georgia, serif; background: #FDF8F3; color: #2C1810; }
input, select, textarea, button { font-family: Georgia, serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #D4B896; border-radius: 3px; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: 240px;
  background: #2C1810; z-index: 200;
  transform: translateX(-100%); transition: transform .25s ease;
  overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 150;
}

.nav-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; color: #A0856C; cursor: pointer;
  font-size: 14px; border: none; background: none;
  width: 100%; text-align: left; transition: background .15s;
}
.nav-btn:hover  { background: #3D2010; color: #F5E6D3; }
.nav-btn.active { background: #C8832A; color: #fff; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(44,24,16,.55);
  display: flex; align-items: center; justify-content: center; z-index: 400;
}
.modal {
  background: #fff; border-radius: 14px; padding: 28px;
  width: 500px; max-width: 95vw; max-height: 90vh;
  overflow-y: auto; position: relative;
}

/* ── Cards & Rows ─────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid #E8D5C0;
  border-radius: 10px; padding: 16px 20px;
}
.row {
  background: #fff; border: 1px solid #E8D5C0; border-radius: 10px;
  padding: 14px 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; transition: box-shadow .15s;
}
.row:hover { box-shadow: 0 4px 14px rgba(200,131,42,.18); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn   { border: none; border-radius: 7px; padding: 8px 18px; cursor: pointer; font-size: 13px; font-family: Georgia, serif; }
.btn-p { background: #C8832A; color: #fff; }
.btn-p:hover { background: #B07020; }
.btn-s { background: #F5E6D3; color: #2C1810; border: 1px solid #D4B896; }
.btn-d { background: #FFF0F0; color: #C0392B; border: 1px solid #FFCDD2; }

/* ── Badges & dots ────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: bold; }
.dot   { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Stats ────────────────────────────────────────────────────────────────── */
.stat-card { background: #fff; border: 1px solid #E8D5C0; border-radius: 12px; padding: 20px; text-align: center; }
.stat-val  { font-size: 32px; font-weight: bold; color: #C8832A; margin-bottom: 4px; }
.stat-lbl  { font-size: 12px; color: #8B6355; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.fld { margin-bottom: 14px; }
.fld label { display: block; font-size: 11px; color: #8B6355; margin-bottom: 4px; font-weight: bold; letter-spacing: .5px; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 9px 12px; border-radius: 7px;
  border: 1px solid #D4B896; font-size: 14px;
  font-family: Georgia, serif; background: #fff;
}
.fld textarea { resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: #C8832A;
  box-shadow: 0 0 0 2px rgba(200,131,42,.15);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Layout helpers ───────────────────────────────────────────────────────── */
.sec-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sec-hdr h2 { font-size: 20px; }

.back-btn { background: none; border: none; color: #C8832A; cursor: pointer; font-size: 14px; margin-bottom: 16px; padding: 0; font-family: Georgia, serif; }
.back-btn:hover { text-decoration: underline; }

.info-box { background: #FDF8F3; border-radius: 8px; padding: 12px 14px; }
.lbl { font-size: 11px; color: #8B6355; margin-bottom: 3px; font-weight: bold; letter-spacing: .5px; }
.pill { border-radius: 20px; padding: 5px 14px; cursor: pointer; font-size: 12px; border: 1px solid #D4B896; font-family: Georgia, serif; }

/* ── Loading & error states ───────────────────────────────────────────────── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh;
  color: #8B6355; font-size: 14px; gap: 14px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #E8D5C0; border-top-color: #C8832A;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-banner {
  background: #FFF0F0; color: #C0392B; border-bottom: 1px solid #FFCDD2;
  padding: 10px 24px; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.readonly-banner {
  background: #FFF8F0; border-bottom: 1px solid #E8D5C0;
  padding: 7px 24px; text-align: center; font-size: 13px; color: #8B6355;
}
