.furrs-crm {
  --ink: #17211e;
  --muted: #68736f;
  --line: #e3cfaa;
  --soft: #f7efe1;
  --surface: #fbf3e6;
  --surface-strong: #efe0c4;
  --brand: #9a690f;
  --brand-dark: #6f4a08;
  --danger: #a92836;
  --warn: #9a6200;
  color: var(--ink);
  font-family: inherit;
}

.furrs-crm * {
  box-sizing: border-box;
}

.furrs-crm [hidden],
.furrs-booking-shell [hidden] {
  display: none !important;
}

.furrs-topbar,
.furrs-card-head,
.furrs-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.furrs-wrap-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.furrs-topbar {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.furrs-topbar h2,
.furrs-card h3,
.furrs-card h4 {
  margin: 0;
}

.furrs-topbar p,
.furrs-muted {
  color: var(--muted);
  margin: 4px 0 0;
}

.furrs-tabs {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 6px;
}

.furrs-tabs button {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--brand-dark);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 700;
  padding: 11px 10px;
}

.furrs-tabs button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.furrs-panel {
  display: none;
}

.furrs-panel.is-active {
  display: block;
}

.furrs-panelbox,
.furrs-card,
.furrs-metric,
.furrs-queue-column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.furrs-button,
.furrs-inline button,
.furrs-row-actions button {
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  padding: 9px 12px;
  text-decoration: none;
}

.furrs-secondary,
.furrs-row-actions button.cancel {
  background: var(--surface-strong);
  color: var(--brand-dark);
}

.furrs-row-actions button.cancel {
  border-color: var(--danger);
  color: var(--danger);
}

.furrs-form,
.furrs-grid,
.furrs-card-grid,
.furrs-metrics,
.furrs-queue,
.furrs-repeaters {
  display: grid;
  gap: 12px;
}

.furrs-booking-shell,
.furrs-mode-toggle,
.furrs-price-box,
.furrs-quick-buttons,
.furrs-calendar-toolbar {
  display: grid;
  gap: 12px;
}

.furrs-branch-step,
.furrs-repeater-row {
  display: grid;
  gap: 8px;
}

.furrs-label,
.furrs-branch-step span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.furrs-repeater-row {
  align-items: end;
  grid-template-columns: minmax(180px, 1fr) auto;
}

.furrs-quick-buttons {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}

.furrs-mode-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 10px;
}

.furrs-mode-toggle label,
.furrs-terms {
  align-items: center;
  display: flex;
  gap: 8px;
}

.furrs-terms input,
.furrs-mode-toggle input {
  width: auto;
}

.furrs-price-box {
  background: var(--surface);
  border: 1px solid #e7c891;
  border-radius: 8px;
  padding: 12px;
}

.furrs-price-box span {
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 800;
}

.furrs-price-box small {
  color: var(--muted);
}

.furrs-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.furrs-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.furrs-metrics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.furrs-queue {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.furrs-calendar-toolbar {
  align-items: center;
  grid-template-columns: auto 1fr auto auto;
  margin-bottom: 14px;
}

.furrs-segmented {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  overflow: hidden;
}

.furrs-segmented button {
  background: var(--surface);
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 9px 12px;
}

.furrs-segmented button.is-active {
  background: var(--brand);
  color: #fff;
}

.furrs-calendar {
  display: grid;
  gap: 10px;
}

.furrs-calendar-week {
  grid-template-columns: repeat(7, minmax(140px, 1fr));
}

.furrs-calendar-month {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.furrs-calendar-daybox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 130px;
  padding: 10px;
}

.furrs-calendar-daybox h4 {
  margin: 0 0 8px;
}

.furrs-calendar-event {
  background: #fff8ed;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  margin-bottom: 7px;
  padding: 8px;
}

.furrs-calendar-event span,
.furrs-calendar-event small {
  color: var(--muted);
}

.wide {
  grid-column: 1 / -1;
}

.furrs-form label {
  display: grid;
  gap: 6px;
}

.furrs-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.furrs-form input,
.furrs-form select,
.furrs-form textarea,
.furrs-inline input,
.furrs-topbar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

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

.furrs-inline {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.furrs-table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

.furrs-table-wrap {
  overflow-x: auto;
}

.furrs-table th,
.furrs-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.furrs-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.furrs-pill,
.furrs-alert {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.furrs-pill {
  background: var(--soft);
  color: var(--muted);
}

.furrs-alert-expired {
  background: #fae8eb;
  color: var(--danger);
}

.furrs-alert-expiring,
.furrs-alert-missing {
  background: #fff4df;
  color: var(--warn);
}

.furrs-alert-ok {
  background: #eaf6ed;
  color: #287a3e;
}

.furrs-row-actions {
  display: grid;
  gap: 6px;
}

.furrs-queue-column {
  background: var(--soft);
}

.furrs-queue-column.is-drop-target {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(23, 107, 93, 0.18);
}

.furrs-queue-card {
  cursor: grab;
}

.furrs-queue-card.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.furrs-verification-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.furrs-choice-list {
  display: grid;
  gap: 8px;
}

.furrs-choice-list label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.furrs-choice-list input {
  min-height: auto;
  width: auto;
}

.furrs-load-light {
  color: #287a3e;
}

.furrs-load-moderate {
  color: var(--warn);
}

.furrs-load-busy {
  color: var(--danger);
}

@media (max-width: 640px) {
  .furrs-topbar,
  .furrs-card-head,
  .furrs-actions,
  .furrs-inline,
  .furrs-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .furrs-calendar-toolbar,
  .furrs-repeater-row,
  .furrs-calendar-week,
  .furrs-calendar-month {
    grid-template-columns: 1fr;
  }
}
