.calendar-event {
  background: color-mix(in srgb, var(--event-team-color, #8a8177) 11%, white);
  border-left: 4px solid var(--event-team-color, #8a8177);
  transition: transform .15s, box-shadow .15s;
}
.calendar-event:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(35, 30, 25, .12); }
.calendar-event small { color: #625c55; }
.calendar-team-legend { display: flex; flex-wrap: wrap; gap: 9px 15px; margin: -8px 0 14px; }
.calendar-team-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.calendar-team-legend i { width: 10px; height: 10px; border-radius: 50%; }
.calendar-team-legend i.unassigned { background: #8a8177; }

.rule-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; margin-top: 8px; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; }
.rule-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.rule-badge.rule-allowed { background: #e8f4ed; color: #327253; }
.rule-badge.rule-pending { background: #fff0d8; color: #a45a20; }
.rule-badge.rule-approved { background: #e7f0ff; color: #315fa5; }
.rule-badge.rule-rejected { background: #fbe9e7; color: #a43d32; }
.pipeline-card .rule-badge { white-space: normal; }
.table-row .rule-badge { display: flex; margin-top: 7px; }

.booking-rule-panel { margin: 18px 0; padding: 17px; border: 1px solid var(--line); border-left: 5px solid #467260; background: #f8fbf9; }
.booking-rule-panel.rule-pending { border-left-color: #c56a2e; background: #fff9ef; }
.booking-rule-panel.rule-approved { border-left-color: #3f6fb5; background: #f3f7ff; }
.booking-rule-panel.rule-rejected { border-left-color: #a43d32; background: #fff6f5; }
.booking-rule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.booking-rule-heading small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; margin-bottom: 5px; }
.booking-rule-heading strong { display: block; font-size: 15px; }
.booking-rule-heading .rule-badge { margin: 0; }
.booking-rule-panel > p { margin: 10px 0 0; color: #625c55; font-size: 12px; line-height: 1.5; }
.booking-rule-panel blockquote { margin: 12px 0 0; padding: 9px 11px; border-left: 3px solid #7393c5; background: #fff; font-size: 12px; }
.rule-choice-toggle { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 15px; border: 1px solid #d9d3ca; border-radius: 4px; overflow: hidden; }
.rule-choice-toggle button { padding: 10px 7px; background: #fff; border-right: 1px solid #d9d3ca; font-size: 11px; font-weight: 700; }
.rule-choice-toggle button:last-child { border-right: 0; }
.rule-choice-toggle button:hover, .rule-choice-toggle button.active { background: #302d28; color: #fff; }
.booking-rule-reason { display: grid; gap: 10px; margin-top: 13px; padding: 13px; background: #fff; border: 1px solid #ddd5c9; }
.booking-rule-reason label { font-size: 11px; font-weight: 700; }
.booking-rule-reason textarea { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); resize: vertical; }
.booking-rule-reason > div { display: flex; justify-content: flex-end; gap: 8px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.team-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--team-color); padding: 18px; box-shadow: 0 7px 20px rgba(41, 35, 28, .05); }
.team-card-heading { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; }
.team-color-dot { display: block; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--team-color); }
.team-card h3 { margin: 0; font-family: 'Playfair Display', serif; font-size: 21px; }
.team-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.team-contact { display: flex; flex-wrap: wrap; gap: 7px 14px; min-height: 22px; margin: 15px 0; color: var(--muted); font-size: 11px; }
.team-card > strong { display: block; margin: 10px 0; font-size: 12px; }
.team-event-link { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 0; background: transparent; border-top: 1px solid var(--line); text-align: left; font-size: 12px; }
.team-event-link span { color: var(--team-color); font-weight: 700; }
.team-notes { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.team-empty { grid-column: 1 / -1; background: #fff; border: 1px dashed #cfc8be; padding: 42px; text-align: center; }
.team-empty h3 { font-family: 'Playfair Display', serif; font-size: 24px; margin: 0; }
.team-empty p { max-width: 520px; margin: 10px auto 18px; color: var(--muted); line-height: 1.6; }
.team-delete-button { margin-top: 8px; color: #a43d32; }
.field-caption { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }

@media (max-width: 700px) {
  .booking-rule-heading { display: grid; }
  .rule-choice-toggle { grid-template-columns: 1fr; }
  .rule-choice-toggle button { border-right: 0; border-bottom: 1px solid #d9d3ca; }
  .rule-choice-toggle button:last-child { border-bottom: 0; }
}
