/* Scoped staff portal styles; inherits the host's Tone Club typography. */
.tone-staff {
  --ts-ink: #352a27;
  --ts-muted: #655a55;
  --ts-line: #d9cec6;
  --ts-paper: #fffdf9;
  --ts-soft: #f3ede6;
  --ts-accent: #7D0000;
  color: var(--ts-ink);
  background: var(--ts-paper);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}
.tone-staff *, .tone-staff *::before, .tone-staff *::after { box-sizing: border-box; }
.tone-staff h1, .tone-staff h2, .tone-staff h3, .tone-staff p { margin: 0; }
.tone-staff h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.2; }
.tone-staff h2 { font-size: 1.4rem; }
.tone-staff h3 { font-size: 1.15rem; }
.tone-staff button, .tone-staff input, .tone-staff select, .tone-staff textarea { font: inherit; }
.tone-staff [hidden] { display: none !important; }
.tone-staff__header, .tone-staff__session-heading, .tone-staff__record-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.tone-staff__header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tone-staff__eyebrow { color: var(--ts-muted); margin-bottom: 6px !important; font-size: .9rem; }
.tone-staff__account { margin-top: 12px !important; font-size: .9rem; }
.tone-staff__body { margin-top: 24px; }
.tone-staff__body[aria-busy="true"] { opacity: .75; }
.tone-staff__notice { padding: 12px 16px; margin-top: 20px; border-radius: 8px; background: #e9f1e8; color: #244d2f; }
.tone-staff__notice--error, .tone-staff__form-error { color: #8a241c; background: #fff0ed; }
.tone-staff__form-error { padding: 12px; border-radius: 6px; }
.tone-staff__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.tone-staff__nav a { color: var(--ts-accent); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-underline-offset: 4px; }
.tone-staff__button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--ts-accent);
  background: var(--ts-accent); color: #fff; cursor: pointer; font-weight: 600;
  text-align: center; line-height: 1.35; max-width: 100%;
}
.tone-staff__button--quiet { color: var(--ts-accent); background: transparent; border-color: var(--ts-line); }
.tone-staff__button:hover:not(:disabled) { filter: brightness(.92); }
.tone-staff :disabled { cursor: not-allowed; opacity: .6; }
.tone-staff :focus-visible { outline: 3px solid #1f6f91; outline-offset: 3px; }
.tone-staff__form { display: grid; gap: 14px; align-items: start; }
.tone-staff__form > .tone-staff__button { justify-self: start; }
.tone-staff__range { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 10px; }
.tone-staff__field { display: grid; gap: 6px; min-width: 0; font-weight: 500; }
.tone-staff__field input, .tone-staff__field select, .tone-staff__field textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid #b7a79c; border-radius: 7px; background: #fff; color: var(--ts-ink);
  font-size: 1rem; line-height: 1.35;
}
.tone-staff__field textarea { resize: vertical; }
.tone-staff__field input[readonly] { background: var(--ts-soft); }
.tone-staff__field select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23655a55' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.tone-staff__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tone-staff__checkbox { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 8px 0; }
.tone-staff__checkbox input { width: 20px; height: 20px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--ts-accent); }
.tone-staff__hint, .tone-staff__muted { color: var(--ts-muted); font-size: .9rem; }
.tone-staff__hint { max-width: 70ch; }
.tone-staff__section { margin-top: 32px; scroll-margin-top: 20px; }
.tone-staff__section > h2 { margin-bottom: 16px; }
.tone-staff__overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.tone-staff__period { margin-top: 22px !important; }
.tone-staff__period + .tone-staff__overview { margin-top: 10px; }
.tone-staff__customer-balances { display: grid; gap: 18px; }
.tone-staff__metric { padding: 16px; background: var(--ts-soft); border-radius: 10px; display: grid; gap: 6px; }
.tone-staff__metric span { font-size: .9rem; color: var(--ts-muted); }
.tone-staff__metric strong { font-size: 1.5rem; }
.tone-staff__sessions { display: grid; gap: 18px; margin-top: 16px; }
.tone-staff__session { border: 1px solid var(--ts-line); border-radius: 12px; padding: 20px; }
.tone-staff__session-heading { margin-bottom: 8px; }
.tone-staff__session-heading h3 + p { margin-top: 4px; }
.tone-staff__badge { display: inline-block; padding: 4px 9px; border-radius: 6px; color: #563b2e; background: #eee2d8; font-size: .875rem; line-height: 1.4; }
.tone-staff__badge--muted { background: #eee; color: #545454; margin-top: 8px !important; }
.tone-staff__details { border: 1px solid var(--ts-line); border-radius: 8px; margin-top: 12px; }
.tone-staff__details > summary { padding: 13px 14px; cursor: pointer; min-height: 44px; font-weight: 600; }
.tone-staff__details[open] > summary { border-bottom: 1px solid var(--ts-line); }
.tone-staff__details-body { padding: 16px; }
.tone-staff__bookings, .tone-staff__records { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.tone-staff__booking { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--ts-line); }
.tone-staff__booking:last-child, .tone-staff__records > li:last-child { border-bottom: 0; padding-bottom: 0; }
.tone-staff__booking-info { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.tone-staff__booking-info > strong { flex-basis: 100%; }
.tone-staff__booking > form { display: flex; align-items: flex-end; flex-wrap: wrap; }
.tone-staff__booking > form .tone-staff__field { flex: 1 1 160px; }
.tone-staff__booking > form .tone-staff__form-error { flex-basis: 100%; order: 3; }
.tone-staff__records > li { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--ts-line); }
.tone-staff__empty { padding: 22px 0; color: var(--ts-muted); }
@media (max-width: 600px) {
  .tone-staff { padding: 18px 14px 32px; }
  .tone-staff__header-actions { width: 100%; }
  .tone-staff__header-actions > button { flex: 1; }
  .tone-staff__range { grid-template-columns: 1fr; }
  .tone-staff__range > .tone-staff__button { width: 100%; }
  .tone-staff__overview { grid-template-columns: 1fr; }
  .tone-staff__metric { grid-template-columns: 1fr auto; align-items: center; }
  .tone-staff__metric strong { font-size: 1.25rem; }
  .tone-staff__session { padding: 14px; }
  .tone-staff__details-body { padding: 12px; }
}
@media (max-width: 380px) {
  .tone-staff__grid { grid-template-columns: 1fr; }
}
