* { box-sizing: border-box; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 3px; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: "Figtree", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--primary); font: 700 11px "Bricolage Grotesque", sans-serif; text-transform: none; letter-spacing: 0; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--ink); font: 800 16px "Bricolage Grotesque", sans-serif; }
.brand-mark.light { color: var(--ink); background: #fff; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 5% 10%, #dedbff, transparent 34%), radial-gradient(circle at 95% 90%, #dfeee5, transparent 32%), #f7f7f5; }
.login-brand { position: fixed; top: 28px; left: 32px; display: flex; align-items: center; gap: 11px; }
.login-card { width: min(100%, 430px); padding: 42px; border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.login-card h1 { margin: 0; font: 800 35px/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -.04em; }
.login-card > p { margin: 10px 0 30px; color: var(--muted); }
.stack-form { display: grid; gap: 17px; }

label { display: grid; gap: 7px; color: #4e5553; font-size: 13px; font-weight: 600; }
label small { color: #959b99; font-weight: 500; }
input, select { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); outline: 0; background: var(--surface); transition: .18s ease; }
input:focus, select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(40,94,168,.10); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--primary); }
.field-label { display: block; margin-bottom: 9px; color: #4e5553; font-size: 12px; font-weight: 700; }
.form-error { margin: 0; color: var(--danger); text-align: center; font-size: 13px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 0; border-radius: 8px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button.primary { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgba(40,94,168,.18); }
.button.primary:hover { background: var(--primary-dark); }
.button.ghost { color: var(--ink); border: 1px solid var(--line); background: #fff; }
.button.danger { color: var(--danger); background: #fff0f0; }
.button.full { width: 100%; min-height: 50px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 22px; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 18px; }
.login-theme-toggle { position: fixed; top: 28px; right: 32px; z-index: 3; }
.sidebar-theme-toggle { min-height: 42px; display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 0 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; color: #c3c8c6; background: transparent; text-align: left; }
.sidebar-theme-toggle + .logout-button { margin-top: 8px; }
.sidebar-theme-toggle [data-theme-icon] { width: 23px; font-size: 17px; text-align: center; }

.dashboard { min-height: 100vh; }
.sidebar { width: 245px; height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; padding: 24px 15px; color: #e7e9e8; background: var(--sidebar); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 23px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand > div { display: grid; }
.sidebar-brand strong { font: 800 15px "Bricolage Grotesque", sans-serif; }
.sidebar-brand small { margin-top: 3px; color: #858e8b; font-size: 12px; }
.manager-card { display: flex; align-items: center; gap: 10px; margin: 18px 3px; padding: 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; background: rgba(255,255,255,.04); }
.manager-card > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--primary); font-size: 12px; font-weight: 800; }
.manager-card div { min-width: 0; display: grid; }
.manager-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.manager-card small { color: #88908e; font-size: 12px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 8px; color: #949c9a; background: transparent; font-weight: 600; text-align: left; }
.nav-item span { width: 23px; font-size: 18px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: rgba(40,94,168,.22); }
.logout-button { min-height: 42px; margin-top: auto; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; color: #c3c8c6; background: transparent; }
.content { min-height: 100vh; margin-left: 245px; padding: 43px clamp(24px, 4vw, 55px) 80px; }
.panel { width: min(1180px, 100%); margin: 0 auto; }
.mobile-header { display: none; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading h1 { margin: 0; font: 800 clamp(31px, 4vw, 43px)/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.045em; }
.page-heading p { margin: 10px 0 0; color: var(--muted); }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.agenda-heading { align-items: center; }
.realtime-status { width: fit-content; display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 5px 9px; border-radius: 999px; color: #246747; background: #e6f5ec; font-size: 12px; font-weight: 700; }
.realtime-status i { width: 7px; height: 7px; border-radius: 50%; background: #35a66e; box-shadow: 0 0 0 3px rgba(53,166,110,.13); }
.realtime-status.connecting { color: #765c22; background: #fff4dc; }
.realtime-status.connecting i { background: #d09a37; box-shadow: none; }
.realtime-status.offline { color: #8e4444; background: #fff0f0; }
.realtime-status.offline i { background: var(--danger); box-shadow: none; }
.date-navigator { display: flex; align-items: end; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.date-navigator label { gap: 2px; }
.date-navigator label span { color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.date-navigator input { width: 150px; min-height: 36px; border: 0; background: transparent; box-shadow: none; }
.date-navigator .icon-button, .date-navigator .button { min-height: 36px; height: 36px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stats-row article { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.stat-icon.purple { color: var(--primary); background: var(--accent-soft); }
.stat-icon.green { color: var(--green); background: #e8f5ed; }
.stat-icon.blue { color: #397aa2; background: #e8f3f8; }
.stats-row article div { display: grid; }
.stats-row strong { font: 800 23px "Bricolage Grotesque", sans-serif; }
.stats-row small { color: var(--muted); }

.agenda-timeline { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.agenda-item { display: grid; grid-template-columns: 75px 1fr auto; align-items: center; gap: 17px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border: 0; }
.agenda-time { font: 800 17px "Bricolage Grotesque", sans-serif; }
.agenda-time small { display: block; margin-top: 3px; color: var(--muted); font: 500 10px "Figtree", sans-serif; }
.agenda-details { min-width: 0; }
.agenda-details strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.agenda-details span { color: var(--muted); font-size: 12px; }
.agenda-actions { display: flex; gap: 7px; }
.status-action { min-height: 34px; padding: 0 11px; border: 0; border-radius: 9px; font-size: 11px; font-weight: 700; }
.status-action.finish { color: #256a4c; background: #e8f5ed; }
.status-action.cancel { color: var(--danger); background: #fff0f0; }
.status-badge { padding: 5px 9px; border-radius: 999px; background: #f0f2ef; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: capitalize; }
.agenda-view-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin: -8px 0 18px; }
.agenda-view-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.agenda-view-switch button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; }
.agenda-view-switch button:hover:not(:disabled) { color: var(--ink); background: var(--soft); }
.agenda-view-switch button[aria-pressed="true"] { color: #fff; background: var(--primary); box-shadow: 0 6px 15px rgba(40,94,168,.2); }
.agenda-view-switch button:disabled { cursor: not-allowed; opacity: .68; }
.agenda-view-switch button small { padding: 3px 5px; border-radius: 999px; color: #6c5715; background: #fff1ba; font-size: 7px; letter-spacing: .04em; text-transform: none; }
.agenda-professional-filter { min-width: 205px; margin-left: auto; grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.agenda-professional-filter select { min-height: 38px; background: #fff; }
.agenda-calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.agenda-calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.agenda-calendar-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.agenda-calendar-legend i.finished { background: var(--green); }
.agenda-calendar-legend i.cancelled { background: #9aa19e; }
.agenda-premium-note { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #e4d9a7; border-radius: 14px; color: #65551a; background: #fffbea; }
.agenda-premium-note > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #7a6310; background: #fff0ad; }
.agenda-premium-note div { min-width: 0; }
.agenda-premium-note strong { display: block; font: 800 12px "Bricolage Grotesque", sans-serif; }
.agenda-premium-note p { margin: 3px 0 0; color: #82723c; font-size: 12px; line-height: 1.4; }
.agenda-calendar { min-height: 410px; }
.calendar-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: 0 9px 30px rgba(34,41,38,.05); }
.calendar-scroll { max-height: min(72vh, 900px); overflow: auto; overscroll-behavior: contain; }
.calendar-grid { --calendar-hour-height: 96px; --calendar-height: 1056px; display: grid; grid-template-columns: 66px repeat(var(--calendar-days), minmax(150px, 1fr)); grid-template-rows: 62px var(--calendar-height); min-width: calc(66px + var(--calendar-days) * 150px); background: #fff; }
.calendar-time-header, .calendar-day-header { position: sticky; top: 0; z-index: 5; display: grid; place-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.calendar-time-header { left: 0; z-index: 7; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.calendar-day-header { gap: 2px; padding: 8px; border: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--ink); font: inherit; }
.calendar-day-header:is(button):hover { background: #f7f6ff; }
.calendar-day-header span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.calendar-day-header strong { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font: 800 12px "Bricolage Grotesque", sans-serif; }
.calendar-day-header.today strong { color: #fff; background: var(--primary); }
.calendar-time-gutter { position: sticky; left: 0; z-index: 4; height: var(--calendar-height); border-right: 1px solid var(--line); background: #fff; }
.calendar-time-label { position: absolute; inset-inline: 0 8px; transform: translateY(-50%); color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.calendar-day-track { position: relative; height: var(--calendar-height); border-right: 1px solid var(--line); background-color: #fff; background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(var(--calendar-hour-height) / 2)); }
.calendar-day-track:last-child { border-right: 0; }
.calendar-day-track.today { background-color: #fcfbff; }
.calendar-event { position: absolute; z-index: 2; min-width: 0; overflow: hidden; padding: 6px 7px; border: 0; border-left: 3px solid #5646e7; border-radius: 7px; color: #342c78; background: #e9e6ff; box-shadow: 0 3px 9px rgba(65,53,144,.13); text-align: left; transition: transform .14s ease, box-shadow .14s ease; }
.calendar-event:hover, .calendar-event:focus-visible { z-index: 3; transform: translateY(-1px); box-shadow: 0 7px 17px rgba(65,53,144,.22); }
.calendar-event time { display: block; overflow: hidden; color: inherit; font-size: 11px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.calendar-event strong { display: block; overflow: hidden; margin-top: 2px; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { display: block; overflow: hidden; margin-top: 2px; color: currentColor; font-size: 11px; line-height: 1.2; opacity: .82; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.status-finalizado { color: #225b43; border-left-color: #2f7659; background: #dff1e7; box-shadow: 0 3px 9px rgba(47,118,89,.12); }
.calendar-event.status-cancelado { color: #666e6b; border-left-color: #8f9794; background: #ecefed; box-shadow: none; opacity: .76; }
.calendar-now-line { position: absolute; inset-inline: 0; z-index: 3; height: 2px; pointer-events: none; background: #e14f4f; }
.calendar-now-line::before { width: 8px; height: 8px; position: absolute; top: 50%; left: -4px; content: ""; transform: translateY(-50%); border-radius: 50%; background: #e14f4f; }
.calendar-empty-hint { position: sticky; left: 82px; z-index: 2; width: max-content; max-width: calc(100vw - 150px); margin: 22px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.92); font-size: 12px; }
.agenda-event-modal { width: min(92vw, 560px); max-height: 90vh; padding: 0; overflow: hidden; border: 0; border-radius: 21px; color: var(--ink); background: transparent; }
.agenda-event-modal::backdrop { background: rgba(12,17,15,.58); backdrop-filter: blur(4px); }
.agenda-event-dialog { max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: 0 25px 80px rgba(9,15,12,.28); }
.agenda-event-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 22px 17px; border-bottom: 1px solid var(--line); }
.agenda-event-dialog > header > div { display: grid; justify-items: start; gap: 8px; }
.agenda-event-dialog h2 { margin: 0; font: 800 21px "Bricolage Grotesque", sans-serif; }
.agenda-event-content { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: auto; background: var(--line); }
.agenda-event-content > div { min-width: 0; padding: 15px 18px; background: var(--surface); }
.agenda-event-content > div.wide { grid-column: 1 / -1; }
.agenda-event-content span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.agenda-event-content strong, .agenda-event-content p { display: block; margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
.agenda-event-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 17px 22px 20px; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state span { font-size: 37px; }
.empty-state h3 { margin: 13px 0 5px; font: 800 18px "Bricolage Grotesque", sans-serif; }
.empty-state p { margin: 0; color: var(--muted); }

.editor-card, .control-card { margin-bottom: 20px; padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: 0 6px 24px rgba(34,41,38,.04); }
.editor-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.editor-card > header > div { display: flex; gap: 12px; }
.editor-card h2, .control-card h2 { margin: 0; font: 800 18px "Bricolage Grotesque", sans-serif; }
.editor-card header p, .control-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.editor-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: var(--accent-soft); font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.span-2 { grid-column: 1 / -1; }
.owner-account-note { padding: 11px 13px; margin: 0 0 15px; border: 1px solid #d9d3ff; border-radius: 8px; color: #5549a8; background: #f5f3ff; font-size: 11px; line-height: 1.5; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; }
.switch-row span { display: grid; }
.switch-row small { color: var(--muted); }
.team-services-fieldset { min-width: 0; padding: 15px; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; transition: .18s ease; }
.team-services-fieldset legend { padding: 0 6px; color: #4e5553; font-size: 12px; font-weight: 800; }
.team-services-fieldset legend span { color: var(--danger); }
.team-services-toolbar { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.team-services-toolbar p { max-width: 660px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.team-service-options { margin: 0; }
.team-service-options .choice-chip { min-height: 36px; cursor: pointer; }
.team-services-fieldset:disabled,
.team-services-fieldset.is-disabled { opacity: .58; background: var(--soft); }
.team-services-fieldset.invalid { border-color: color-mix(in srgb, var(--danger) 65%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 9%, transparent); }
.team-services-error { margin: 10px 0 0; color: var(--danger); font-size: 12px; font-weight: 700; }
.team-services-empty { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.editor-card > footer, .control-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.people-grid, .service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.person-card, .service-card { min-height: 190px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: .2s ease; }
.person-card:hover, .service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.person-card.is-inactive, .service-card.is-inactive { border-style: dashed; background: color-mix(in srgb, var(--surface) 72%, var(--canvas)); }
.person-card.is-inactive:hover, .service-card.is-inactive:hover { transform: none; box-shadow: none; }
.person-head, .service-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 11px; }
.person-avatar { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), #988cff); font: 800 13px "Bricolage Grotesque", sans-serif; }
.role-pill, .service-pill { padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e9f6ee; font-size: 12px; font-weight: 800; }
.role-pill.support { color: #7b6b31; background: #fff4d9; }
.owner-pill { padding: 5px 8px; border-radius: 999px; color: #6b4b13; background: #fff0cf; font-size: 12px; font-weight: 800; }
.inactive-pill { padding: 5px 8px; border-radius: 999px; color: #6a716e; background: #e9ecea; font-size: 12px; font-weight: 800; }
.person-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.access-pill { padding: 5px 8px; border-radius: 999px; color: #5365a8; background: #edf0ff; font-size: 12px; font-weight: 800; }
.access-pill.disabled { color: var(--muted); background: #f0f2ef; }
.person-card h3, .service-card h3 { margin: 16px 0 4px; font: 800 16px "Bricolage Grotesque", sans-serif; }
.person-card > span, .service-card > span { color: var(--muted); font-size: 11px; }
.person-services { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.person-service-tag { max-width: 100%; overflow: hidden; padding: 5px 7px; border-radius: 8px; color: #5549a8; background: #f0eeff; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.person-services-empty { margin-top: 12px; color: #9a681c; font-size: 12px; font-weight: 700; }
.card-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 16px; }
.card-actions button { min-height: 33px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 700; }
.card-actions .delete { color: var(--danger); }
.service-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 8px; color: #92672a; background: #fff2de; font-size: 19px; }
.service-meta { display: flex; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.service-card.attention { border-color: #ead5aa; }
.service-pill.warning { color: #8a5d17; background: #fff3d8; }
.service-coverage { margin-top: 10px; color: var(--muted); font-size: 12px; }
.service-coverage.warning { color: #8a5d17; font-weight: 700; }
.catalog-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 14px 15px; margin-bottom: 15px; border: 1px solid #ead5aa; border-radius: 14px; color: #74521c; background: #fff9e9; }
.catalog-alert > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #ba8329; font-weight: 800; }
.catalog-alert > div { min-width: 0; display: grid; gap: 2px; }
.catalog-alert strong { font-size: 12px; }
.catalog-alert p { margin: 0; color: #8a6b3a; font-size: 12px; line-height: 1.4; }

.pet-config { padding: 18px; margin-top: 20px; border: 1px solid #eadff0; border-radius: 16px; background: #fcf9ff; }
.pet-config-title { display: flex; gap: 11px; margin-bottom: 17px; }
.pet-config-title > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 8px; color: #b06483; background: #f9e7ef; }
.pet-config-title h3 { margin: 0; font: 800 15px "Bricolage Grotesque", sans-serif; }
.pet-config-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.pet-catalog-toolbar { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 17px; }
.inline-add { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 36px; margin-bottom: 17px; }
.choice-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 11px; }
.choice-chip:has(input:checked) { color: var(--primary); border-color: #b8b0ff; background: #f0eeff; }
.choice-chip input { width: 14px; min-height: 14px; }
.size-config-list { display: grid; gap: 8px; }
.size-row { display: grid; grid-template-columns: 1.2fr .8fr .8fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.size-row > label:first-child { display: flex; align-items: center; gap: 8px; }
.size-row label span { display: grid; }
.size-row label small { font-size: 12px; }
.size-row input[type="number"] { min-height: 37px; }
.size-row.disabled { opacity: .52; }

.control-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.control-head label { width: min(280px, 100%); }
.schedule-toolbar { display: grid; grid-template-columns: minmax(190px, .45fr) 1.55fr; align-items: end; gap: 18px; padding: 15px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfa; }
.replicate-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.replicate-heading .field-label small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.link-button { padding: 2px 0; border: 0; color: var(--primary); background: transparent; font-size: 12px; font-weight: 800; white-space: nowrap; }
.link-button:disabled { color: var(--muted); cursor: default; }
.replicate-list { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.replicate-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.replicate-chip:has(input:checked) { color: var(--primary); border-color: #b8b0ff; background: #f0eeff; }
.replicate-chip input { width: 14px; min-height: 14px; }
.muted-note { color: var(--muted); font-size: 11px; }
.weekly-schedule { display: grid; gap: 8px; }
.week-row { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(360px, 1.7fr) auto; align-items: start; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.week-day { display: flex; align-items: center; gap: 10px; }
.week-day span { display: grid; }
.week-day strong { font-size: 12px; }
.week-day small { color: var(--muted); font-size: 12px; }
.week-row.closed { opacity: .5; background: #f6f7f5; }
.day-periods { display: grid; gap: 8px; }
.period-row { display: grid; grid-template-columns: minmax(105px, 1fr) auto minmax(105px, 1fr) 32px; align-items: end; gap: 8px; }
.period-row > span { padding-bottom: 11px; color: var(--muted); font-size: 12px; }
.period-row label { gap: 3px; font-size: 12px; }
.period-row input { min-height: 37px; }
.add-period { min-height: 36px; padding: 0 11px; border: 1px dashed var(--line); border-radius: 10px; color: var(--primary); background: transparent; font-size: 12px; font-weight: 700; }
.remove-period { width: 32px; height: 37px; border: 1px solid var(--line); border-radius: 9px; color: var(--danger); background: #fff; }
.control-card > footer { justify-content: space-between; }
.control-card > footer > span { color: var(--muted); font-size: 11px; }

.leave-layout { display: grid; grid-template-columns: 360px 1fr; gap: 17px; align-items: start; }
.leave-form { display: grid; gap: 15px; }
.leave-form .form-actions { display: flex; gap: 8px; }
.leave-list { display: grid; gap: 8px; }
.leave-item { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.leave-date-block { display: grid; place-items: center; padding: 7px; border-radius: 10px; color: var(--primary); background: var(--accent-soft); }
.leave-date-block strong { font: 800 17px "Bricolage Grotesque", sans-serif; }
.leave-date-block small { font-size: 11px; text-transform: none; }
.leave-item div:nth-child(2) { display: grid; }
.leave-item div:nth-child(2) strong { font-size: 12px; }
.leave-item div:nth-child(2) small { color: var(--muted); font-size: 12px; }
.leave-actions { display: flex; gap: 5px; }
.leave-actions button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.leave-actions .delete { color: var(--danger); }

.whatsapp-loading { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.whatsapp-loading > div { display: grid; gap: 3px; }
.whatsapp-loading strong { color: var(--ink); font-size: 13px; }
.whatsapp-loading small { font-size: 11px; }
.whatsapp-loading-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: #26855b; background: #e5f5ec; font-size: 24px; animation: whatsapp-spin 1.1s linear infinite; }
@keyframes whatsapp-spin { to { transform: rotate(360deg); } }

.whatsapp-status-card { overflow: hidden; position: relative; padding: 0; }
.whatsapp-status-card::before { height: 4px; position: absolute; inset: 0 0 auto; content: ""; background: #a3aaa7; }
.whatsapp-status-card[data-status="conectado"]::before { background: #35a66e; }
.whatsapp-status-card[data-status="aguardando_aprovacao"]::before { background: #d09a37; }
.whatsapp-status-card[data-status="atencao"]::before { background: var(--danger); }
.whatsapp-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 25px 19px; }
.whatsapp-title { display: flex; align-items: flex-start; gap: 14px; }
.whatsapp-title .eyebrow { margin-bottom: 5px; color: #26855b; }
.whatsapp-title h2 { font-size: 20px; }
.whatsapp-title p { max-width: 650px; }
.whatsapp-logo { width: 47px; height: 47px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #27b66f, #168a50); box-shadow: 0 9px 22px rgba(32,153,91,.2); font-size: 24px; }
.whatsapp-status-badge { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--muted); background: #f0f2ef; font-size: 12px; font-weight: 800; }
.whatsapp-status-badge::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: #9aa19e; }
[data-status="conectado"] .whatsapp-status-badge { color: #246747; background: #e6f5ec; }
[data-status="conectado"] .whatsapp-status-badge::before { background: #35a66e; box-shadow: 0 0 0 3px rgba(53,166,110,.13); }
[data-status="aguardando_aprovacao"] .whatsapp-status-badge { color: #8b641c; background: #fff4dc; }
[data-status="aguardando_aprovacao"] .whatsapp-status-badge::before { background: #d09a37; }
[data-status="atencao"] .whatsapp-status-badge { color: #9b4141; background: #fff0f0; }
[data-status="atencao"] .whatsapp-status-badge::before { background: var(--danger); }
.whatsapp-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfa; }
.whatsapp-details > div { min-width: 0; display: grid; gap: 5px; padding: 16px 20px; border-right: 1px solid var(--line); }
.whatsapp-details > div:last-child { border: 0; }
.whatsapp-details small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: .05em; }
.whatsapp-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.whatsapp-alert { margin: 17px 25px 0; padding: 11px 13px; border: 1px solid #efc8c8; border-radius: 8px; color: #954141; background: #fff5f5; font-size: 11px; line-height: 1.5; }
.whatsapp-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 25px 22px; }

.whatsapp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 17px; align-items: stretch; }
.whatsapp-grid > .control-card { height: calc(100% - 20px); }
.whatsapp-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.whatsapp-section-title h2 { margin: 0; font: 800 18px "Bricolage Grotesque", sans-serif; }
.whatsapp-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.template-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: var(--muted); background: #f0f2ef; font-size: 12px; font-weight: 800; }
.template-badge[data-status="aprovado"] { color: #246747; background: #e6f5ec; }
.template-badge[data-status="pendente"] { color: #8b641c; background: #fff4dc; }
.template-badge[data-status="rejeitado"] { color: #9b4141; background: #fff0f0; }
.message-preview { min-height: 277px; display: flex; align-items: center; justify-content: center; padding: 26px; border: 1px solid #dedbd2; border-radius: 8px; background-color: #eeeae1; background-image: radial-gradient(circle at 15% 15%, rgba(40,94,168,.07) 0 2px, transparent 3px), radial-gradient(circle at 82% 75%, rgba(38,133,91,.08) 0 2px, transparent 3px); background-size: 38px 38px, 48px 48px; }
.message-bubble { width: min(100%, 470px); position: relative; padding: 14px 15px 10px; border-radius: 8px 8px 8px 2px; color: #24302b; background: #dcf8e8; box-shadow: 0 4px 15px rgba(43,53,48,.11); font-size: 11px; line-height: 1.55; }
.message-bubble::before { position: absolute; left: -7px; bottom: 0; content: ""; border-width: 0 8px 9px 0; border-style: solid; border-color: transparent #dcf8e8 transparent transparent; }
.message-bubble p { margin: 0 0 8px; color: inherit; font-size: inherit; }
.message-bubble time { display: block; margin-top: -4px; color: #71827a; font-size: 11px; text-align: right; }
.template-caption { margin: 11px 0 0 !important; color: var(--muted); font-size: 9px !important; text-align: center; }
.test-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #26855b; background: #e5f5ec; font-size: 18px; }
.whatsapp-test-card form { display: grid; gap: 14px; }
.whatsapp-help { min-height: 32px; margin: 0 !important; color: var(--muted); font-size: 10px !important; line-height: 1.5; }

.whatsapp-history { display: grid; gap: 8px; }
.whatsapp-history .empty-state { padding: 44px 20px; }
.whatsapp-history-item { padding: 14px 15px; border: 1px solid var(--line); border-left: 3px solid #c7ccc9; border-radius: 8px; background: var(--surface); }
.whatsapp-history-item[data-tone="sent"] { border-left-color: #6590bc; }
.whatsapp-history-item[data-tone="delivered"],
.whatsapp-history-item[data-tone="read"] { border-left-color: #35a66e; }
.whatsapp-history-item[data-tone="failed"] { border-left-color: var(--danger); }
.whatsapp-history-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.whatsapp-history-main > div { min-width: 0; display: grid; gap: 3px; }
.whatsapp-history-main strong { font-size: 12px; }
.whatsapp-history-main span { color: var(--muted); font-size: 12px; }
.notification-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #737b78 !important; background: #eef0ed; font-size: 9px !important; font-weight: 800; }
[data-tone="sent"] .notification-badge { color: #3f6c94 !important; background: #e9f2fa; }
[data-tone="delivered"] .notification-badge,
[data-tone="read"] .notification-badge { color: #246747 !important; background: #e6f5ec; }
[data-tone="failed"] .notification-badge { color: #9b4141 !important; background: #fff0f0; }
.whatsapp-history-meta { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.whatsapp-history-error { margin: 10px 0 0 !important; padding: 8px 10px; border-radius: 8px; color: #954141 !important; background: #fff1f1; font-size: 10px !important; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; max-width: calc(100% - 28px); padding: 13px 18px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #fff; background: #245f49; box-shadow: 0 14px 36px rgba(13,30,24,.28); font-size: 12px; font-weight: 700; }
.toast.error { color: #fff; background: #963f3f; }
.sidebar-overlay { display: none; }

html[data-theme="dark"] .login-page { background: radial-gradient(circle at 5% 10%, #292640, transparent 34%), radial-gradient(circle at 95% 90%, #1e3528, transparent 32%), #101412; }
html[data-theme="dark"] .login-card { background: rgba(26,31,29,.94); }
html[data-theme="dark"] label,
html[data-theme="dark"] .field-label { color: #cbd1ce; }
html[data-theme="dark"] input,
html[data-theme="dark"] select { color: var(--ink); border-color: var(--line); background: var(--soft); }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus { background: var(--surface); }
html[data-theme="dark"] .brand-mark { color: var(--soft); background: #edf2ef; }
html[data-theme="dark"] .brand-mark.light { color: var(--soft); background: #edf2ef; }
html[data-theme="dark"] .button.ghost,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .date-navigator,
html[data-theme="dark"] .stats-row article,
html[data-theme="dark"] .agenda-timeline,
html[data-theme="dark"] .agenda-view-switch,
html[data-theme="dark"] .agenda-professional-filter select,
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .calendar-grid,
html[data-theme="dark"] .calendar-time-header,
html[data-theme="dark"] .calendar-day-header,
html[data-theme="dark"] .calendar-time-gutter,
html[data-theme="dark"] .calendar-day-track,
html[data-theme="dark"] .editor-card,
html[data-theme="dark"] .control-card,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .card-actions button,
html[data-theme="dark"] .choice-chip,
html[data-theme="dark"] .size-row,
html[data-theme="dark"] .leave-actions button { color: var(--ink); border-color: var(--line); background: var(--surface); }
html[data-theme="dark"] .switch-row,
html[data-theme="dark"] .schedule-toolbar,
html[data-theme="dark"] .week-row.closed { background: var(--soft); }
html[data-theme="dark"] .team-services-fieldset { border-color: var(--line); background: var(--soft); }
html[data-theme="dark"] .team-services-fieldset legend { color: #cbd1ce; }
html[data-theme="dark"] .team-services-fieldset:disabled,
html[data-theme="dark"] .team-services-fieldset.is-disabled { background: #111513; }
html[data-theme="dark"] .owner-account-note { color: var(--primary); border-color: #4b4275; background: #242035; }
html[data-theme="dark"] .pet-config { border-color: #3a3042; background: #1d1920; }
html[data-theme="dark"] .choice-chip:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); }
html[data-theme="dark"] .replicate-chip,
html[data-theme="dark"] .remove-period { color: var(--ink); border-color: var(--line); background: var(--surface); }
html[data-theme="dark"] .replicate-chip:has(input:checked) { color: var(--primary); border-color: var(--primary); background: var(--accent-soft); }
html[data-theme="dark"] .stat-icon.purple,
html[data-theme="dark"] .editor-icon,
html[data-theme="dark"] .leave-date-block { background: var(--accent-soft); }
html[data-theme="dark"] .stat-icon.green { background: #1e342a; }
html[data-theme="dark"] .stat-icon.blue { background: #1d3039; }
html[data-theme="dark"] .role-pill,
html[data-theme="dark"] .service-pill { background: #1e342a; }
html[data-theme="dark"] .role-pill.support { color: #ddc77e; background: #39321f; }
html[data-theme="dark"] .owner-pill { color: #f1d38a; background: #40351f; }
html[data-theme="dark"] .inactive-pill { color: #bdc5c1; background: #2b312e; }
html[data-theme="dark"] .realtime-status { color: #9ad5b5; background: #1e342a; }
html[data-theme="dark"] .realtime-status.connecting { color: #e3c77e; background: #39321f; }
html[data-theme="dark"] .realtime-status.offline { color: #efaaaa; background: #3a2323; }
html[data-theme="dark"] .person-service-tag { color: var(--primary); background: var(--accent-soft); }
html[data-theme="dark"] .service-pill.warning { color: #e3c77e; background: #39321f; }
html[data-theme="dark"] .service-card.attention { border-color: #594b2d; }
html[data-theme="dark"] .catalog-alert { color: #e7cd90; border-color: #594b2d; background: #2c271d; }
html[data-theme="dark"] .catalog-alert p { color: #c5ad7c; }
html[data-theme="dark"] .agenda-view-switch button:hover:not(:disabled) { color: var(--ink); background: #252b28; }
html[data-theme="dark"] .agenda-premium-note { color: #e9d58e; border-color: #5d512c; background: #29251a; }
html[data-theme="dark"] .agenda-premium-note > span { color: #f1d56f; background: #40381f; }
html[data-theme="dark"] .agenda-premium-note p { color: #b9a96f; }
html[data-theme="dark"] .calendar-day-header:is(button):hover { background: var(--accent-soft); }
html[data-theme="dark"] .calendar-day-track { background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(var(--calendar-hour-height) / 2)); }
html[data-theme="dark"] .calendar-day-track.today { background-color: var(--soft); }
html[data-theme="dark"] .calendar-event { color: var(--primary); border-left-color: var(--primary); background: var(--accent-soft); }
html[data-theme="dark"] .calendar-event.status-finalizado { color: #a9ddc3; border-left-color: #64b18d; background: #20392d; }
html[data-theme="dark"] .calendar-event.status-cancelado { color: #aeb5b2; border-left-color: #7e8783; background: #282d2a; }
html[data-theme="dark"] .calendar-empty-hint { background: rgba(26,31,29,.94); }
html[data-theme="dark"] .service-icon { background: #392d1d; }
html[data-theme="dark"] .mobile-header { background: rgba(16,20,18,.94); }
html[data-theme="dark"] .whatsapp-loading-icon,
html[data-theme="dark"] .test-icon { background: #1e342a; }
html[data-theme="dark"] .whatsapp-details,
html[data-theme="dark"] .whatsapp-history-item { background: var(--soft); }
html[data-theme="dark"] .message-preview { border-color: var(--line); background-color: #111613; }
html[data-theme="dark"] .message-bubble { color: #e6eee9; background: #214c38; }
html[data-theme="dark"] .message-bubble::before { border-right-color: #214c38; }
html[data-theme="dark"] .message-bubble time { color: #a2b8ad; }
html[data-theme="dark"] .whatsapp-alert,
html[data-theme="dark"] .whatsapp-history-error { color: #efaaaa !important; border-color: #603535; background: #321e1e; }
html[data-theme="dark"] .whatsapp-status-badge,
html[data-theme="dark"] .template-badge,
html[data-theme="dark"] .notification-badge { background: #282d2a; }
html[data-theme="dark"] [data-status="conectado"] .whatsapp-status-badge,
html[data-theme="dark"] .template-badge[data-status="aprovado"],
html[data-theme="dark"] [data-tone="delivered"] .notification-badge,
html[data-theme="dark"] [data-tone="read"] .notification-badge { color: #88d4af !important; background: #1e342a; }
html[data-theme="dark"] [data-status="aguardando_aprovacao"] .whatsapp-status-badge,
html[data-theme="dark"] .template-badge[data-status="pendente"] { color: #e3c77e; background: #39321f; }
html[data-theme="dark"] [data-status="atencao"] .whatsapp-status-badge,
html[data-theme="dark"] .template-badge[data-status="rejeitado"],
html[data-theme="dark"] [data-tone="failed"] .notification-badge { color: #efaaaa !important; background: #3a2323; }
html[data-theme="dark"] [data-tone="sent"] .notification-badge { color: #9ac5e8 !important; background: #20313e; }

@media (max-width: 1050px) {
    .people-grid, .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leave-layout { grid-template-columns: 1fr; }
    .whatsapp-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .whatsapp-details > div:nth-child(2) { border-right: 0; }
    .whatsapp-details > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .whatsapp-grid { grid-template-columns: 1fr; }
    .whatsapp-grid > .control-card { height: auto; }
}

@media (max-width: 760px) {
    .sidebar { transform: translateX(-105%); transition: transform .24s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 25; display: none; background: rgba(19,24,23,.45); }
    .sidebar-overlay.active { display: block; }
    .content { margin-left: 0; padding: 82px 16px 55px; }
    .mobile-header { height: 66px; position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(15px); }
    .mobile-header > div { display: grid; text-align: center; }
    .mobile-header strong { font-size: 12px; }
    .mobile-header small { color: var(--muted); font-size: 12px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading > .button { width: 100%; }
    .heading-actions { width: 100%; }
    .heading-actions .button { min-width: 0; flex: 1; }
    .agenda-heading { align-items: stretch; }
    .agenda-view-bar { align-items: stretch; }
    .agenda-view-switch { width: 100%; }
    .agenda-view-switch button { min-width: 0; flex: 1; justify-content: center; padding-inline: 8px; }
    .agenda-view-switch button small { display: none; }
    .agenda-professional-filter { width: 100%; margin-left: 0; grid-template-columns: 1fr; }
    .agenda-calendar-legend { width: 100%; }
    .agenda-premium-note { align-items: flex-start; }
    .date-navigator { display: grid; grid-template-columns: auto 1fr auto; }
    .date-navigator label { grid-column: 2; grid-row: 1; }
    .date-navigator #agenda-prev { grid-column: 1; grid-row: 1; }
    .date-navigator #agenda-next { grid-column: 3; grid-row: 1; }
    .date-navigator #agenda-today { grid-column: 1 / -1; }
    .date-navigator input { width: 100%; }
    .stats-row { grid-template-columns: 1fr; }
    .agenda-item { grid-template-columns: 55px 1fr; }
    .agenda-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .calendar-scroll { max-height: calc(100vh - 170px); }
    .calendar-grid { grid-template-columns: 58px repeat(var(--calendar-days), minmax(145px, 1fr)); min-width: calc(58px + var(--calendar-days) * 145px); }
    .calendar-empty-hint { left: 66px; }
    .agenda-event-content { grid-template-columns: 1fr; }
    .agenda-event-content > div.wide { grid-column: auto; }
    .agenda-event-dialog > footer { flex-direction: column-reverse; }
    .agenda-event-dialog > footer .button { width: 100%; }
    .people-grid, .service-grid { grid-template-columns: 1fr; }
    .form-grid, .pet-catalog-toolbar { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .team-services-toolbar { align-items: stretch; flex-direction: column; }
    .team-services-toolbar .link-button { align-self: flex-start; }
    .catalog-alert { grid-template-columns: auto 1fr; }
    .catalog-alert .button { grid-column: 1 / -1; width: 100%; }
    .editor-card { padding: 18px; }
    .editor-card > footer { flex-direction: column-reverse; }
    .editor-card > footer .button { width: 100%; }
    .control-head { align-items: stretch; flex-direction: column; }
    .control-head label { width: 100%; }
    .schedule-toolbar { grid-template-columns: 1fr; }
    .week-row { grid-template-columns: 1fr; }
    .week-day { grid-column: auto; }
    .add-period { width: 100%; }
    .size-row { grid-template-columns: 1fr 1fr; }
    .size-row > label:first-child { grid-column: 1 / -1; }
    .whatsapp-card-head { flex-direction: column; }
    .whatsapp-status-badge { margin-left: 61px; }
    .whatsapp-details { grid-template-columns: 1fr; }
    .whatsapp-details > div,
    .whatsapp-details > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .whatsapp-details > div:last-child { border-bottom: 0; }
    .whatsapp-history-card .control-head .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .calendar-event { transition: none; }
}

@media (max-width: 480px) {
    .login-brand { top: 20px; left: 20px; }
    .login-card { padding: 30px 22px; }
    .page-heading h1 { font-size: 31px; }
    .inline-add { grid-template-columns: 1fr; }
    .leave-item { grid-template-columns: 48px 1fr; }
    .leave-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .period-row { grid-template-columns: 1fr auto 1fr 32px; }
    .whatsapp-card-head { padding: 23px 18px 17px; }
    .whatsapp-title { align-items: center; }
    .whatsapp-logo { width: 42px; height: 42px; border-radius: 8px; }
    .whatsapp-status-badge { margin-left: 0; }
    .whatsapp-actions { align-items: stretch; flex-direction: column; padding: 16px 18px 19px; }
    .whatsapp-actions .button { width: 100%; }
    .message-preview { padding: 16px; }
    .whatsapp-history-main { align-items: stretch; flex-direction: column; }
    .notification-badge { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
