:root {
  color-scheme: light;
  --background: #fdf6ec;
  --background-2: #faf0e0;
  --primary: #c9a227;
  --primary-hover: #b8911f;
  --primary-light: rgba(201, 162, 39, 0.12);
  --primary-mid: rgba(201, 162, 39, 0.22);
  --dark: #231a10;
  --dark-2: #3d2f1e;
  --muted: #8a7a6a;
  --muted-light: #b0a090;
  --card: #ffffff;
  --card-warm: #fffcf7;
  --border: #e8dcc8;
  --border-light: #f0e8d8;
  --danger: #b42318;
  --danger-light: #fff1f0;
  --success: #1a7a3a;
  --success-light: #f0faf4;
  --shadow-sm: 0 1px 3px rgba(43, 33, 24, 0.07), 0 1px 2px rgba(43, 33, 24, 0.05);
  --shadow-md: 0 4px 12px rgba(43, 33, 24, 0.09), 0 2px 4px rgba(43, 33, 24, 0.06);
  --shadow-lg: 0 8px 28px rgba(43, 33, 24, 0.11), 0 3px 8px rgba(43, 33, 24, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #fdf6ec 0%, #faf0df 60%, #f7ead4 100%);
  background-attachment: fixed;
  color: var(--dark);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

/* ── App shell ─────────────────────────────────────── */

.app-shell {
  min-height: 100vh;
  padding: 18px 14px 96px;
}

/* ── Topbar ─────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,252,247,0.75) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  object-fit: contain;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  font-weight: 700;
  letter-spacing: 0;
}

/* ── Status pill ───────────────────────────────────── */

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--muted);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.status-pill.is-online {
  color: var(--success);
  border-color: rgba(26, 122, 58, 0.25);
  background: var(--success-light);
}

.status-pill.is-offline {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-light);
}

/* ── Main view ──────────────────────────────────────── */

.main-view {
  max-width: 980px;
  margin: 0 auto;
}

/* ── Connection banner ──────────────────────────────── */

.connection-banner {
  max-width: 980px;
  margin: 0 auto 18px;
  border: 1px solid rgba(180, 35, 24, 0.2);
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  color: var(--danger);
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(180, 35, 24, 0.08);
}

/* ── Panel / Card ───────────────────────────────────── */

.panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.auth-panel {
  max-width: 520px;
  margin: 32px auto 0;
}

.auth-logo {
  display: block;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  object-fit: contain;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

/* ── Section heading ────────────────────────────────── */

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

/* ── Session card ───────────────────────────────────── */

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.session-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Home briefing ──────────────────────────────────── */

.home-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.home-card {
  margin-bottom: 0;
}

.home-card-reminder {
  background: var(--card);
  border-left: 3px solid var(--primary);
}

.home-action-sheet {
  display: grid;
  gap: 8px;
}

.primary-action-sheet {
  position: fixed;
  right: 14px;
  bottom: 86px;
  left: 14px;
  z-index: 20;
  max-width: 980px;
  margin: 0 auto;
}

.primary-action-sheet__panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: var(--shadow-md);
  padding: 12px;
}

.primary-action-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.primary-action-sheet__header strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.sheet-option {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.sheet-option strong {
  color: var(--dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.sheet-option span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.home-actions {
  margin-top: 10px;
}

/* ── Quick actions ──────────────────────────────────── */

.birthday-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.birthday-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.birthday-item strong {
  color: var(--dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.birthday-item span,
.birthday-item small {
  color: var(--muted);
}

.birthday-item span {
  font-size: 0.88rem;
}

.birthday-item small {
  font-size: 0.78rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.quick-action {
  min-height: 52px;
  text-align: center;
}

/* ── Grid / Metrics ─────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.metric {
  min-height: 98px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  padding: 16px;
  background: var(--card-warm);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.metric:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--dark);
}

.revenue-grid .metric strong {
  font-size: 1.3rem;
}

.revenue-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── Export actions ─────────────────────────────────── */

.export-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

/* ── Utility ────────────────────────────────────────── */

.muted {
  color: var(--muted);
}

.small-note {
  margin: 12px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ── Buttons ────────────────────────────────────────── */

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #d4ab2d 0%, #c9a227 50%, #b8911f 100%);
  color: #1a1100;
  padding: 0 20px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.35), 0 1px 2px rgba(201, 162, 39, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.primary-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.45), 0 2px 4px rgba(201, 162, 39, 0.25);
  filter: brightness(1.05);
}

.primary-action:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(201, 162, 39, 0.3);
  filter: brightness(0.97);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--dark-2);
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.secondary-action:hover:not(:disabled) {
  background: var(--card-warm);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.secondary-action:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--dark-2);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease;
}

.icon-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-action:hover {
  background: var(--card-warm);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.icon-action:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.install-action {
  gap: 8px;
  white-space: nowrap;
}

.install-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.full-width {
  width: 100%;
}

/* ── Forms ──────────────────────────────────────────── */

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.month-day-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.month-day-field legend {
  padding: 0;
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.month-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.month-day-grid label {
  display: grid;
  gap: 6px;
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-stack input,
.form-stack select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  color: var(--dark);
  padding: 0 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.form-stack textarea,
.search-row input,
.search-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  color: var(--dark);
  padding: 0 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.form-stack textarea {
  min-height: 104px;
  padding: 12px 14px;
  resize: vertical;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus,
.search-row input:focus,
.search-row select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-mid);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 0.88rem;
}

.form-success {
  color: var(--success);
  font-weight: 700;
}

/* ── Settings ───────────────────────────────────────── */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.settings-grid .inline-form {
  margin: 0;
}

.settings-export-panel {
  align-self: start;
}

/* ── Activity log ───────────────────────────────────── */

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-row {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}

.activity-row:hover {
  box-shadow: var(--shadow-md);
}

.activity-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-action {
  margin: 8px 0 4px;
  color: var(--dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.activity-details {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

/* ── Search row ─────────────────────────────────────── */

.search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(140px, 180px)) auto;
  gap: 10px;
  margin: 16px 0;
}

/* ── Customer cards ─────────────────────────────────── */

.list-stack {
  display: grid;
  gap: 10px;
}

.customer-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.customer-card-main,
.record-sale-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.customer-card h3 {
  margin-bottom: 5px;
  font-size: 0.97rem;
}

.card-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  justify-content: flex-end;
}

/* ── Tags ───────────────────────────────────────────── */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag-row span {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card-warm);
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ── Compact action ─────────────────────────────────── */

.compact-action {
  min-height: 38px;
  margin-top: 0;
  padding: 0 12px;
  font-size: 0.84rem;
}

/* ── Check grid ─────────────────────────────────────── */

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  padding: 14px;
}

.check-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
}

.check-grid input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

/* ── Warning / archive boxes ────────────────────────── */

.warning-box {
  margin-top: 16px;
  border: 1px solid rgba(180, 35, 24, 0.2);
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  color: var(--dark);
  padding: 14px 16px;
}

.inline-form {
  margin: 16px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.inline-form h3 {
  margin-bottom: 4px;
}

.archive-note {
  margin: 12px 0 0;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: var(--radius-sm);
  background: #fffbf0;
  color: var(--dark-2);
  padding: 12px 14px;
  font-size: 0.87rem;
  font-weight: 600;
}

/* ── Profile ────────────────────────────────────────── */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-photo-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-photo-form label {
  display: grid;
  gap: 6px;
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-photo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.customer-thumbnail {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.customer-thumbnail-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
}

.profile-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
}

.compact-metric {
  min-height: 84px;
}

.compact-metric strong {
  margin-top: 8px;
  font-size: 1rem;
}

.profile-tags {
  margin-bottom: 18px;
}

/* ── Transaction history ────────────────────────────── */

.history-row {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-warm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}

.history-row:hover {
  box-shadow: var(--shadow-md);
}

.transaction-history-item {
  display: grid;
  gap: 8px;
}

.history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.section-heading-tight {
  margin-top: 20px;
  align-items: center;
}

.section-heading-tight h3 {
  margin-bottom: 0;
}

/* ── Media ──────────────────────────────────────────── */

.media-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--card-warm);
}

.media-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 160px));
  gap: 10px;
  margin-top: 10px;
}

.media-thumb {
  margin: 0;
}

.media-thumb-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--card-warm);
  font-size: 0.83rem;
  font-weight: 700;
}

.media-thumb-expired img {
  display: none;
}

.media-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  object-fit: cover;
}

.media-thumb figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.after-photo-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.after-photo-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

/* ── Follow-ups ─────────────────────────────────────── */

.followup-sections {
  display: grid;
  gap: 14px;
}

.followup-group {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-md);
  padding: 20px;
  overflow: hidden;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
}

.group-title h3 {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
}

.group-title span {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
  color: #7a5c00;
  padding: 4px 12px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
}

.schedule-list {
  display: grid;
}

.followup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.followup-card:last-child {
  border-bottom: 0;
}

.followup-card:hover {
  background: #fffbf2;
  box-shadow: 0 6px 18px rgba(80, 58, 22, 0.06);
}

.schedule-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.followup-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.followup-card__title {
  min-width: 0;
}

.followup-card__title h4 {
  margin: 0 0 4px;
  color: var(--dark);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.followup-card__reason {
  margin: 0;
  color: var(--dark-2);
  font-size: 0.88rem;
  font-weight: 600;
}

.followup-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.followup-card__due {
  margin: 0;
  color: #7a5c00;
  font-size: 0.8rem;
  font-weight: 700;
}

.followup-note-panel {
  display: grid;
  gap: 10px;
}

.followup-note-label {
  margin: 0;
  color: var(--dark-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.followup-note-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-pill {
  min-height: 36px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: var(--radius-pill);
  background: #fff8ea;
  color: #6b4a00;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.note-pill:hover {
  transform: translateY(-1px);
  background: #fff2d6;
  border-color: rgba(201, 162, 39, 0.35);
}

.note-pill-muted {
  background: transparent;
  color: var(--dark-2);
  border-color: var(--border);
}

.followup-note-wrap {
  display: grid;
  gap: 6px;
}

.is-hidden {
  display: none !important;
}

.schedule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-actions .primary-action {
  min-width: 92px;
}

/* ── Status chips ───────────────────────────────────── */

.status-chip {
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.status-pending {
  background: #fff4e0;
  color: #8a4800;
  border: 1px solid rgba(180, 100, 0, 0.18);
}

.status-suggested {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(26, 122, 58, 0.2);
}

.status-complete {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(26, 122, 58, 0.2);
}

.status-muted {
  background: #f2f0ec;
  color: var(--muted);
  border: 1px solid var(--border);
}

.followup-card textarea {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--dark);
  padding: 10px 14px;
  resize: vertical;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.followup-card textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-mid);
}

.empty-schedule {
  margin: 12px 0 0;
  color: var(--muted);
}

/* ── Preview switcher ───────────────────────────────── */

.preview-switcher {
  margin-bottom: 16px;
}

/* ── Bottom nav ─────────────────────────────────────── */

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
  border-top: 1px solid var(--border-light);
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -4px 20px rgba(43, 33, 24, 0.08);
}

.bottom-nav[hidden] {
  display: none;
}

.bottom-nav a {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  color: var(--muted-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  transition: color 150ms ease;
}

.bottom-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  color: var(--muted-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  transition: color 150ms ease;
}

.bottom-nav a > span {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: background 150ms ease, color 150ms ease;
}

.bottom-nav button > span {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: background 150ms ease, color 150ms ease;
}

.bottom-nav a:hover > span,
.bottom-nav button:hover > span {
  color: var(--dark-2);
  background: var(--primary-light);
}

.bottom-nav a[aria-current="page"],
.bottom-nav button[aria-current="page"] {
  color: var(--dark);
  position: relative;
}

.bottom-nav a[aria-current="page"] > span,
.bottom-nav button[aria-current="page"] > span {
  color: #6b4a00;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.12) 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
  font-weight: 700;
}

/* ── Responsive ─────────────────────────────────────── */

@media (min-width: 760px) {
  .app-shell {
    padding: 28px 28px 104px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .topbar {
    padding: 14px 20px;
  }
}

@media (max-width: 520px) {
  .section-heading,
  .profile-heading,
  .profile-photo-form,
  .session-card,
  .customer-card,
  .customer-card-main,
  .record-sale-main,
  .card-actions,
  .followup-card,
  .schedule-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .schedule-main {
    width: 100%;
  }

  .followup-card {
    grid-template-columns: 1fr;
  }

  .followup-card__top {
    flex-direction: column;
  }

  .schedule-actions {
    width: 100%;
  }

  .schedule-actions .secondary-action,
  .schedule-actions .primary-action {
    width: 100%;
    justify-content: center;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    width: 100%;
    align-items: stretch;
  }

  .dashboard-actions .secondary-action,
  .dashboard-actions .icon-action {
    width: 100%;
  }

  .customer-thumbnail {
    width: 64px;
    height: 64px;
  }
}
