/* PersonalHelp · clientes e agenda. Uses the application's existing brand tokens. */
.crm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 0 0 24px; }
.crm-stat { min-width: 0; padding: 19px 21px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.crm-stat small { display: block; font-size: 12px; line-height: 1.6; color: var(--muted); }
.crm-stat strong { display: block; margin-top: 7px; color: #77356f; font-family: Manrope, sans-serif; font-size: 29px; line-height: 1.25; font-weight: 750; letter-spacing: -.8px; }
.crm-stat:nth-child(2) { background: linear-gradient(140deg, #fff, #fcf1f8); }
.crm-stat:nth-child(3) { background: linear-gradient(140deg, #fff, #fff3ed); }
.crm-stat p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.crm-notice, .crm-help { padding: 14px 17px; margin: 0 0 20px; border: 1px solid #ecdbe8; background: #fcf5fa; color: #755b70; border-radius: 11px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.crm-notice strong, .crm-help strong { color: #843a77; }
.crm-notice.warning, .crm-help.warning { background: #fff6ed; color: #805932; border-color: #efd9c5; }
.crm-notice.success, .crm-help.success { background: #f0f8f3; color: #3d6b51; border-color: #d5e8dc; }
.crm-notice.error, .crm-help.error { background: #fff1f4; color: #9c314c; border-color: #efccd6; }
.crm-notice p, .crm-help p { margin: 0; }
.crm-notice p + p, .crm-help p + p { margin-top: 6px; }

.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.client-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; box-shadow: var(--shadow); }
.client-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.client-avatar { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 13px; background: linear-gradient(135deg, #f5dfef, #ffe4d7); color: #873b78; font-family: Manrope, sans-serif; font-size: 14px; font-weight: 750; }
.client-card-info { min-width: 0; }
.client-card-info h3 { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.client-card-info p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 5px 0 0; overflow-wrap: anywhere; }
.client-card-meta { display: grid; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.7; padding-bottom: 18px; overflow-wrap: anywhere; }
.client-card-meta p { margin: 0; }
.client-card-meta > span, .client-card-meta > div { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.client-card-meta svg { width: 15px; height: 15px; color: #a35c90; margin-top: 3px; }
.client-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.client-card-actions .button { flex: 1 1 auto; white-space: normal; font-size: 12px; padding: 10px 12px; }
.client-detail-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 23px; align-items: start; }
.client-detail-layout > * { min-width: 0; }
.client-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 20px; }
.client-contact-grid > * { min-width: 0; overflow-wrap: anywhere; }
.client-contact-grid small, .client-contact-grid dt { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 6px; }
.client-contact-grid p, .client-contact-grid dd { margin: 0; font-size: 13px; line-height: 1.8; }
.client-contact-grid strong { font-weight: 550; font-size: 13px; line-height: 1.8; }
.client-history { display: grid; gap: 0; }
.client-history-item { padding: 17px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.client-history-item:first-child { padding-top: 0; }
.client-history-item:last-child { padding-bottom: 0; border-bottom: 0; }
.client-history-item strong, .client-history-item h3 { display: block; font-size: 13px; line-height: 1.7; }
.client-history-item p, .client-history-item small { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 5px 0 0; }
.client-history-item .inline-actions { margin-top: 9px; }
.crm-form, .appointment-form { max-width: 900px; }
.crm-form .field-grid, .appointment-form .field-grid { margin-bottom: 20px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions .button { white-space: normal; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-actions .button { white-space: normal; }
.client-picker-list { display: grid; gap: 10px; margin: 17px 0; max-height: 350px; overflow-y: auto; padding: 4px; }
.client-picker-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid #e8d8e3; border-radius: 11px; color: var(--ink); padding: 15px 17px; min-height: 70px; }
.client-picker-item > div { min-width: 0; }
.client-picker-item strong { display: block; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.client-picker-item small, .client-picker-item p { display: block; font-size: 12px; line-height: 1.6; color: var(--muted); margin: 4px 0 0; overflow-wrap: anywhere; }
.client-picker-item:hover { border-color: #bc77a7; background: #fffafd; }
.client-picker-item.selected { border-color: #b563a1; background: linear-gradient(120deg, #fbecf7, #fff3ec); box-shadow: 0 0 0 1px #b563a126; }
.client-picker-item.selected > svg { color: #944180; }
.selected-client { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 13px; padding: 17px 19px; margin: 0 0 23px; background: linear-gradient(120deg, #faedf7, #fff3eb); border: 1px solid #eddaE6; border-radius: 12px; }
.selected-client > div { min-width: 0; }
.selected-client strong { display: block; font-size: 14px; line-height: 1.6; color: #803970; overflow-wrap: anywhere; }
.selected-client p, .selected-client small { display: block; margin: 5px 0 0; font-size: 12px; line-height: 1.7; color: #7a6474; overflow-wrap: anywhere; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 21px; align-items: start; }
.calendar-layout > * { min-width: 0; }
.calendar-panel { padding: 22px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-bottom: 21px; }
.calendar-toolbar h2 { font-size: 19px; text-transform: capitalize; }
.calendar-toolbar > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.calendar-toolbar .button { padding: 10px 12px; font-size: 12px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 9px 13px; margin: 0 0 21px; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font-size: 11px; line-height: 1.5; color: #6f5d6d; }
.legend-dot, .calendar-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #99519f; }
.legend-dot.visit, .calendar-dot.visit { background: #99519f; }
.legend-dot.service, .calendar-dot.service { background: #d2755a; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 9px; color: #7d6778; font-size: 11px; font-weight: 650; text-align: center; }
.calendar-weekdays > * { padding: 5px 0; min-width: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-day { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 100px; padding: 9px 5px 7px; text-align: left; color: #574a55; background: #fff; border: 1px solid #f0e5ec; border-radius: 9px; }
.calendar-day:hover { background: #fff8fc; border-color: #c795b9; }
.calendar-day.outside { color: #8c8189; background: #fcf9fb; }
.calendar-day.outside .calendar-events { opacity: .8; }
.calendar-day.today { border-color: #be78ab; }
.day-number { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; align-self: flex-start; font-size: 12px; line-height: 1; font-weight: 600; border-radius: 50%; }
.calendar-day.today .day-number { background: #f1deed; color: #8c3779; font-weight: 750; }
.calendar-day.selected { background: linear-gradient(150deg, #f9eaf5, #fff2eb); border-color: #a94d90; box-shadow: inset 0 0 0 1px #a94d90; }
.calendar-day.selected .day-number { color: #fff; background: #913d80; font-weight: 750; }
.calendar-events { display: grid; gap: 3px; margin-top: 7px; min-width: 0; }
.calendar-event { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 1.6; border-radius: 4px; padding: 2px 4px; text-align: left; color: #7b3b7b; background: #f4e5f4; }
.calendar-event.visit { color: #7b3b7b; background: #f4e5f4; }
.calendar-event.service { color: #945139; background: #ffe9dd; }
.calendar-event.cancelled { color: #7c6a75; background: #f2edf0; text-decoration: line-through; }
.calendar-events small { font-size: 10px; line-height: 1.5; color: #73576c; padding: 1px 3px; }
.calendar-count { display: none; }
.calendar-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 13px; margin: 0 0 22px; }
.calendar-filters .field { min-width: 180px; max-width: 100%; }
.calendar-filters select { min-height: 46px; max-width: 100%; background: #fff; border: 1px solid #e2d1de; border-radius: 8px; padding: 11px 35px 11px 12px; color: var(--ink); font-size: 14px; }
.agenda-list { min-width: 0; }
.agenda-date { margin-bottom: 19px; }
.agenda-date h2 { font-size: 18px; line-height: 1.6; text-transform: capitalize; }
.agenda-date p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 6px 0 0; }
.agenda-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid #a35aa7; border-radius: 11px; padding: 17px 16px; margin-bottom: 13px; box-shadow: var(--shadow); min-width: 0; }
.agenda-item.visit { border-left-color: #a35aa7; }
.agenda-item.service { border-left-color: #df957c; }
.agenda-item.cancelled { background: #faf7f9; border-left-color: #a99ba5; }
.agenda-item.cancelled .agenda-item-title { text-decoration: line-through; color: #7b6b76; }
.agenda-item-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.agenda-time { display: inline-flex; align-items: center; gap: 6px; color: #79436e; font-size: 12px; font-weight: 650; line-height: 1.6; font-variant-numeric: tabular-nums; }
.agenda-time svg { width: 15px; height: 15px; }
.agenda-item-title { display: block; font-size: 14px; line-height: 1.6; font-weight: 650; color: #50414d; overflow-wrap: anywhere; margin: 0 0 6px; }
.agenda-item-meta { font-size: 12px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.agenda-item-meta p { margin: 3px 0; }
.agenda-item-meta svg { width: 14px; height: 14px; vertical-align: text-bottom; margin-right: 4px; }
.agenda-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.agenda-item-actions .button { font-size: 11px; padding: 9px 10px; white-space: normal; }
.event-kind, .event-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; line-height: 1.6; background: #f5eaf3; color: #7e4376; }
.event-kind.visit, .event-kind .visit { background: #f4e7f5; color: #7a3c7c; }
.event-kind.service, .event-kind .service { background: #fff0e6; color: #9a573c; }
.event-status { background: #f5f0f4; color: #73606e; font-weight: 500; }
.event-status.confirmed, .event-status.completed { background: #edf6ef; color: #42684d; }
.event-status.cancelled { background: #f1ecef; color: #7a6672; }
.agenda-empty { padding: 29px 20px; border: 1px dashed #e4cddd; border-radius: 12px; text-align: center; background: #fffafd; }
.agenda-empty > svg { width: 31px; height: 31px; color: #ad6a99; margin-bottom: 12px; }
.agenda-empty h3, .agenda-empty strong { display: block; font-size: 14px; line-height: 1.7; color: #795a70; }
.agenda-empty p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 8px 0 16px; }
.agenda-empty .button { white-space: normal; }
.schedule-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.schedule-options > * { min-width: 0; }
.schedule-options .inline-actions { grid-column: 1 / -1; }
.event-type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0 0 23px; }
.event-type-options label { display: flex; align-items: flex-start; gap: 11px; padding: 17px; min-height: 80px; border: 1px solid #e6d5e1; border-radius: 11px; cursor: pointer; background: #fff; }
.event-type-options label input { margin: 2px 0 0; }
.event-type-options label strong { display: block; font-size: 13px; line-height: 1.6; color: #745169; }
.event-type-options label small { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 4px; }
.event-type-options label:has(input:checked) { border-color: #b46c9d; background: linear-gradient(120deg, #fbecf7, #fff4ed); box-shadow: 0 0 0 1px #b46c9d1c; }
.event-type-options label:has(input:focus-visible) { outline: 3px solid #c885ae50; outline-offset: 3px; }

@media (max-width: 1350px) {
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 17px; }
  .calendar-panel { padding: 19px 15px; }
  .calendar-toolbar h2 { font-size: 17px; }
  .calendar-day { min-height: 90px; }
  .calendar-event { font-size: 9px; }
}
@media (max-width: 1150px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .agenda-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .agenda-date, .agenda-empty { grid-column: 1 / -1; }
  .agenda-date { margin-bottom: 2px; }
  .agenda-item { margin: 0; }
  .calendar-day { min-height: 95px; }
  .calendar-event { font-size: 10px; }
}
@media (max-width: 1080px) and (min-width: 681px) {
  .sidebar { width: 200px; }
  .sidebar nav { width: 100%; }
  .nav-button { min-height: 73px; padding: 10px 3px; }
  .nav-button span:not(.nav-count) { display: block; font-size: 11px; line-height: 1.5; white-space: normal; }
}
@media (max-width: 850px) {
  .client-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .client-card { padding: 19px; }
  .crm-stat { padding: 17px; }
  .calendar-day { min-height: 80px; }
  .calendar-filters select { font-size: 16px; }
}
@media (max-width: 680px) {
  .sidebar { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .sidebar nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .nav-button { min-width: 0; min-height: 60px; padding: 8px 2px; gap: 5px; }
  .nav-button span:not(.nav-count) { font-size: 10px; line-height: 1.5; white-space: nowrap; }
  .nav-button svg { width: 20px; height: 20px; }
  .nav-button.active { box-shadow: inset 0 3px #a54a8c; }
  .crm-stats { gap: 9px; margin-bottom: 20px; }
  .crm-stat { padding: 14px 12px; border-radius: 11px; }
  .crm-stat small { font-size: 11px; }
  .crm-stat strong { font-size: 25px; }
  .crm-stat p { font-size: 10px; }
  .client-grid { gap: 13px; }
  .client-card { padding: 18px; }
  .client-card-top { align-items: flex-start; }
  .client-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 12px; }
  .client-card-info h3 { font-size: 13px; }
  .calendar-layout { gap: 17px; }
  .calendar-panel { padding: 20px 13px; }
  .calendar-toolbar { gap: 10px; margin-bottom: 17px; }
  .calendar-toolbar h2 { font-size: 18px; }
  .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 65px; padding: 7px 4px; align-items: center; }
  .day-number { align-self: center; font-size: 12px; }
  .calendar-events { display: none; }
  .calendar-count { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; min-height: 12px; margin-top: 5px; color: #80516f; font-size: 10px; line-height: 1.3; }
  .calendar-count .calendar-dot { width: 5px; height: 5px; }
  .calendar-legend { margin-bottom: 16px; gap: 7px; }
  .calendar-weekdays { font-size: 10px; }
  .agenda-list { grid-template-columns: minmax(0, 1fr); }
  .agenda-item { padding: 17px; }
  .agenda-item-actions .button { font-size: 12px; }
  .calendar-filters { gap: 12px; }
  .calendar-filters .field { flex: 1 1 150px; min-width: 0; }
  .calendar-filters select { width: 100%; }
}
@media (max-width: 560px) {
  .client-grid { grid-template-columns: minmax(0, 1fr); }
  .client-card { padding: 21px; }
  .client-card-info h3 { font-size: 14px; }
  .client-card-actions .button { flex: 1 1 calc(50% - 8px); }
  .client-contact-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .form-actions { justify-content: stretch; margin-top: 23px; }
  .form-actions .button { flex: 1 1 120px; }
  .event-type-options, .schedule-options { grid-template-columns: minmax(0, 1fr); }
  .event-type-options label { padding: 16px; }
  .selected-client { padding: 16px; }
  .selected-client .button { min-height: 44px; }
  .crm-notice, .crm-help { padding: 14px; }
  .calendar-panel { margin-left: -16px; margin-right: -16px; padding: 21px 6px; border-left: 0; border-right: 0; border-radius: 0; }
  .calendar-toolbar, .calendar-legend { margin-left: 10px; margin-right: 10px; }
  .calendar-toolbar { justify-content: center; }
  .calendar-toolbar h2 { flex: 1 1 100%; text-align: center; font-size: 19px; }
  .calendar-toolbar > div { justify-content: center; }
  .calendar-grid { gap: 0; }
  .calendar-day { min-height: 60px; border-radius: 7px; padding: 6px 2px; border-color: transparent; }
  .calendar-day.outside { background: #fcf9fb; }
  .calendar-day.today { border-color: #d8a4c6; }
  .calendar-day.selected { border-color: #a94d90; }
  .calendar-weekdays { margin-bottom: 7px; }
  .calendar-legend { justify-content: center; }
  .agenda-date h2 { font-size: 17px; }
}
@media (max-width: 360px) {
  .calendar-panel { margin-left: -12px; margin-right: -12px; }
  .crm-stats { gap: 6px; }
  .crm-stat { padding: 12px 9px; }
  .crm-stat small { font-size: 10px; line-height: 1.7; }
  .crm-stat strong { font-size: 23px; }
  .crm-stat p { line-height: 1.7; }
  .client-card { padding: 18px; }
  .calendar-day { min-height: 58px; }
  .calendar-toolbar .button { padding-left: 10px; padding-right: 10px; }
  .agenda-item-actions .button { flex: 1 1 auto; }
}

/* Orçamentos e serviços fechados share the same clear, compact workspace. */
.quote-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0 0 21px; }
.quote-tab { position: relative; min-width: 0; min-height: 96px; border: 1px solid var(--line); border-radius: 13px; padding: 19px 66px 19px 20px; background: #fff; color: #766171; text-align: left; box-shadow: var(--shadow); }
.quote-tab strong { display: block; font-family: Manrope, sans-serif; font-size: 15px; line-height: 1.6; color: #62445b; }
.quote-tab small { display: block; font-size: 12px; line-height: 1.7; margin-top: 4px; color: var(--muted); }
.quote-tab:hover { border-color: #c88bb5; background: #fffafd; }
.quote-tab.active, .quote-tab[aria-pressed="true"] { border-color: #ba72a3; background: linear-gradient(125deg, #faeaf5, #fff3eb); box-shadow: inset 0 -3px #b05a94; }
.quote-tab.active strong, .quote-tab[aria-pressed="true"] strong { color: #873a76; }
.quote-tab-count { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); display: inline-grid; place-items: center; min-width: 33px; min-height: 33px; padding: 4px 8px; background: #f4e9f0; border-radius: 10px; color: #845274; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quote-tab.active .quote-tab-count, .quote-tab[aria-pressed="true"] .quote-tab-count { background: #efd5e6; color: #7b346d; }
.quote-stage-note { margin: 0 0 22px; padding: 13px 16px; border: 1px solid #efdfE9; border-radius: 10px; background: #fff8fc; color: #7a6173; font-size: 12px; line-height: 1.8; }
.quote-stage-note p { margin: 0; }
.closing-form { max-width: 900px; }
.closing-form .field-grid { margin-top: 21px; }
.closing-form .form-actions { margin-top: 24px; }
.closing-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding: 19px 21px; margin: 0 0 22px; background: linear-gradient(120deg, #f9ecf5, #fff2e9); border: 1px solid #ecd9e5; border-radius: 12px; overflow-wrap: anywhere; }
.closing-summary > * { min-width: 0; }
.closing-summary strong { display: block; font-family: Manrope, sans-serif; color: #79356c; font-size: 20px; line-height: 1.6; }
.closing-summary small, .closing-summary p { display: block; margin: 4px 0 0; color: #765e70; font-size: 12px; line-height: 1.8; }
.record-schedule { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px 10px; font-size: 12px; line-height: 1.8; color: #80546f; margin-top: 8px; overflow-wrap: anywhere; }
.record-schedule svg { width: 15px; height: 15px; margin-top: 3px; }
.record-validity { color: #6f5a68; font-size: 12px; line-height: 1.7; margin-top: 8px; }
.record-validity.expired { color: #97482b; font-weight: 600; }
.record-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.record-actions .button { white-space: normal; }
.maps-link { white-space: normal; line-height: 1.5; min-height: 44px; text-align: center; }
.client-card-actions .maps-link { flex: 1 1 100%; }
.agenda-item-actions .maps-link { flex: 1 1 100%; }
.client-card-actions .maps-link, .agenda-item-actions .maps-link { background: #fff9fc; border-color: #e7d2df; color: #873b76; }
@media (min-width: 951px) {
  .record-actions { flex: 0 1 390px; }
}
@media (max-width: 950px) {
  .record-actions { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .quote-tabs { gap: 9px; margin-bottom: 17px; }
  .quote-tab { min-height: 126px; padding: 15px 12px 48px; }
  .quote-tab strong { font-size: 13px; }
  .quote-tab small { font-size: 11px; line-height: 1.6; }
  .quote-tab-count { top: auto; right: 12px; bottom: 12px; transform: none; min-width: 28px; min-height: 26px; border-radius: 7px; font-size: 12px; }
  .quote-stage-note { padding: 13px 14px; }
  .closing-summary { padding: 17px; gap: 12px; }
  .closing-summary > * { flex: 1 1 100%; }
  .closing-summary strong { font-size: 19px; }
  .record-actions { justify-content: flex-start; gap: 8px; }
  .record-actions .button { flex: 1 1 120px; }
}

/* Preparation reminders remain visually distinct from visits and booked services. */
.legend-dot.preparation, .calendar-dot.preparation { background: #8a83b8; }
.calendar-event.preparation { background: #efedf9; color: #62558f; }
.event-kind.preparation { background: #efedf9; color: #62558f; }
.agenda-item.preparation { border-left-color: #9289c1; }
.agenda-item.preparation.cancelled { border-left-color: #a99ba5; }
.client-preparation { padding: 12px 14px; margin: 0 0 17px; border: 1px solid #e3ddf0; border-radius: 10px; background: #f7f4fc; color: #6c5d87; font-size: 12px; line-height: 1.7; }
.client-preparation strong { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; }
.client-preparation strong svg { width: 15px; height: 15px; }
.client-preparation span { display: block; margin-top: 4px; }
.client-card-actions [data-action="crm-client-prepare"] { flex: 1 1 100%; }
.event-type-options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.client-tabs .quote-tab strong { overflow-wrap: anywhere; }
.button.danger { color: #a63e57; border-color: #e9bdc8; background: #fff8fa; min-height: 44px; white-space: normal; }
.button.danger:hover { color: #913047; border-color: #ce8195; background: #fff0f4; filter: none; }
.button.danger:focus-visible { outline-color: #bd617b; }
.agenda-item-actions .button.danger { flex: 1 1 100%; }
@media (max-width: 680px) {
  .event-type-options.three { grid-template-columns: minmax(0, 1fr); }
  .client-tabs .quote-tab { min-height: 140px; }
}
