/* Estilos da página Home */

.environment-badge {
  position: fixed;
  z-index: 10000;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border: 1px solid #202020;
  border-radius: 8px;
  background: #f6ee76;
  color: #202020;
  font: 700 12px/1.2 Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
}

.environment-badge strong {
  font-weight: 900;
}

.landing-container {
  text-align: center;
  margin-top: 60px;
  font-family: Arial;
}

/* Dashboard administrativo */
.admin-schedule {
  max-width: 1480px;
  color: #202124;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-schedule-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 1px solid #dfe1e5;
}

.admin-schedule-header h1 {
  margin: 3px 0 0;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.week-range {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #5f6368;
  text-transform: capitalize;
}

.week-range span {
  color: #202124;
  font-size: 25px;
  font-weight: 750;
}

.week-range strong {
  font-size: 14px;
  font-weight: 600;
}

.week-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.week-nav-link,
.week-current-link {
  padding: 8px 10px;
  border: 1px solid #d8dadd;
  border-radius: 6px;
  color: #202124;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.week-nav-link:hover,
.week-current-link:hover {
  background: #f4f4f2;
}

.week-current-link {
  border-color: #292929;
  background: #292929;
  color: #fff;
}

.week-current-link:hover {
  background: #3a3a3a;
}

.upcoming-section {
  margin-bottom: 28px;
}

.upcoming-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.upcoming-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: 0;
}

.upcoming-datetime {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-align: right;
  text-transform: capitalize;
}

.upcoming-datetime time {
  color: #5f6368;
  font-size: 14px;
  font-weight: 600;
}

.upcoming-datetime strong {
  color: #202124;
  font-size: 25px;
  letter-spacing: 0;
}

.upcoming-empty {
  margin: 0;
  color: #777;
  font-size: 14px;
}

.admin-schedule .next-slot-summary {
  margin: 0;
  border-color: #dfe1e5;
  box-shadow: 0 1px 2px rgba(32, 33, 36, 0.06);
}

.admin-schedule .schedule-metrics {
  border-top: 0;
}

.admin-schedule .schedule-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-height: 74px;
  padding: 15px 20px;
  box-sizing: border-box;
}

.admin-schedule .schedule-metrics > div:nth-child(1) {
  box-shadow: inset 0 3px #5f6368;
}

.admin-schedule .schedule-metrics > div:nth-child(2) {
  box-shadow: inset 0 3px #D99A16;
}

.admin-schedule .schedule-metrics > div:nth-child(3) {
  box-shadow: inset 0 3px #2f7d52;
}

.admin-schedule .schedule-metrics strong {
  grid-row: auto;
  color: #202124;
  font-size: 31px;
  line-height: 1;
}

.admin-schedule .schedule-metrics span {
  color: #5f6368;
  font-size: 14px;
  font-weight: 650;
}

.admin-calendar-shell {
  border-color: #d8dadd;
  box-shadow: 0 4px 18px rgba(32, 33, 36, 0.07);
}

.calendar-mobile-hint {
  display: none;
}

.admin-calendar thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 68px;
  background: #f7f8f9;
}

.admin-calendar thead th span {
  margin-bottom: 5px;
  color: #686c72;
  font-size: 12px;
  font-weight: 650;
}

.admin-calendar thead th strong {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 16px;
  line-height: 28px;
}

.admin-calendar thead th.is-today strong {
  background: #202124;
  color: #fff;
}

.admin-calendar .time-column {
  width: 78px;
  background: #fafafa;
  color: #6a6d72;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.admin-calendar .calendar-slot {
  height: 112px;
  padding: 7px;
  background: #fff;
}

.admin-calendar .calendar-slot.is-next-slot {
  background: #FFECC4;
  box-shadow: inset 0 0 0 2px #D99A16;
}

.admin-calendar .calendar-event {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #d8dadd;
  border-left-width: 4px;
  background: #f7f8f9;
  box-shadow: 0 1px 2px rgba(32, 33, 36, 0.05);
}

.admin-calendar .calendar-event.confirmed {
  border-color: #78B990;
  border-left-color: #2f7d52;
  background: #D7F0E1;
}

.admin-calendar .calendar-event.in-progress {
  border-color: #7AA2EA;
  border-left-color: #376ed4;
  background: #D7E6FF;
}

.admin-calendar .calendar-event.finished {
  border-color: #c9cbce;
  border-left-color: #4a4d52;
  background: #f1f1f1;
}

.event-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.admin-calendar .event-heading strong {
  font-size: 13px;
  line-height: 1.3;
}

.admin-calendar .event-heading small {
  flex: 0 0 auto;
  margin: 0;
  padding: 3px 6px;
  border-radius: 4px;
  background: #e4e5e7;
  color: #55585d;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-calendar .confirmed .event-heading small {
  background: #d9eee2;
  color: #24613f;
}

.admin-calendar .in-progress .event-heading small {
  background: #dce7f9;
  color: #2755a5;
}

.admin-calendar .scheduled .event-heading small {
  background: #FFE2A8;
  color: #A66B00;
}

.admin-calendar .absent .event-heading small {
  background: transparent;
  color: #A31624;
}

.admin-calendar .justified-absence .event-heading small {
  background: transparent;
  color: #A316A3;
}

.admin-calendar .event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 5px;
}

.admin-calendar .event-meta span {
  color: #686c72;
  min-width: 0;
}

.admin-calendar .event-professional {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.admin-calendar .event-professional small {
  margin-top: 2px;
  color: #686c72;
  font-size: 10px;
  line-height: 1.2;
}

.admin-calendar .event-professional .event-service-location {
  color: #34383c;
  font-weight: 700;
}

.admin-calendar .event-actions {
  gap: 7px;
  margin-top: 9px;
}

.admin-calendar .event-button {
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 10px;
}

.admin-calendar .event-icon-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.admin-calendar .delete-event-button,
.admin-calendar .edit-event-button {
  width: 16px;
  height: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.admin-calendar .delete-event-button svg,
.admin-calendar .edit-event-button svg {
  display: block;
  width: 13px;
  height: 13px;
  margin: 1px auto 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.admin-calendar .delete-event-button:hover,
.admin-calendar .edit-event-button:hover {
  background: transparent;
  opacity: 0.72;
}

.admin-calendar .delete-event-form {
  flex: 0 0 auto;
  margin: 0;
}

.admin-calendar .calendar-event.confirmed .delete-event-button,
.admin-calendar .calendar-event.confirmed .edit-event-button {
  color: #24613f;
}

.admin-calendar .calendar-event.in-progress .delete-event-button,
.admin-calendar .calendar-event.in-progress .edit-event-button {
  color: #2755a5;
}

.admin-calendar .calendar-event.absent .delete-event-button,
.admin-calendar .calendar-event.absent .edit-event-button {
  color: #A31624;
}

.admin-calendar .calendar-event.justified-absence .delete-event-button,
.admin-calendar .calendar-event.justified-absence .edit-event-button {
  color: #A316A3;
}

.admin-calendar .calendar-event.scheduled .delete-event-button,
.admin-calendar .calendar-event.scheduled .edit-event-button {
  color: #A66B00;
}

.admin-calendar .cancel-button {
  background: transparent;
  color: #A31624;
}

.admin-calendar .cancel-button:hover {
  background: #FFE0E4;
}

@media (max-width: 720px) {
  .admin-schedule-header,
  .upcoming-heading,
  .upcoming-datetime {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }

  .admin-schedule-header h1 {
    font-size: 27px;
  }

  .admin-schedule .schedule-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-schedule .schedule-metrics > div {
    align-items: center;
    flex-direction: column;
    gap: 5px;
    min-height: 84px;
    padding: 13px 6px;
    border-right: 1px solid #e2e2e2;
    border-bottom: 0;
    text-align: center;
  }

  .admin-schedule .schedule-metrics > div:last-child {
    border-right: 0;
  }

  .admin-schedule .schedule-metrics strong {
    font-size: 27px;
  }

  .admin-schedule .schedule-metrics span {
    font-size: 12px;
  }
}

.landing-title {
  font-size: 48px;
}

.landing-subtitle {
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

/* Moldura para a Home */
.landing-box {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}


.black-btn,
.green-btn,
.red-btn,
.blue-btn,
.yellow-btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  display: inline-block;
  margin: 10px;
  border: none;
  background-color: #D99A16;
  color: #292929;
  font-family: Arial, sans-serif
}

.inline-form {
  display: inline;
}

.user-action-btn {
  width: 42px;
  height: 42px;
  padding: 9px;
  margin: 4px;
  vertical-align: middle;
  cursor: pointer;
}

.user-action-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.black-btn {
  background-color: #292929;
  color: #fff;
}

.green-btn {
  background-color: #118A34;
  color: #fff;
}

.red-btn {
  background-color: #B91C2B;
  color: #fff;
}

.blue-btn {
  background-color: #0057D9;
  color: #fff;
}

.green-btn,
.red-btn,
.blue-btn {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.green-btn:hover {
  background-color: #0A6F28;
}

.red-btn:hover {
  background-color: #941321;
}

.blue-btn:hover {
  background-color: #003F9E;
}

/* Form Fields */
.form-field {
  text-align: left;
  margin-bottom: 18px;
}

.form-field label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.form-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-field .supervised-registration:read-only {
  border-color: #aeb4ba;
  background: #eceff1;
  color: #666b70;
  box-shadow: inset 0 0 0 1px #d5d9dc;
  cursor: not-allowed;
}

.actions {
  margin-top: 25px;
}

.password-visibility-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}

.password-visibility-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #111;
  cursor: pointer;
}

.devise-links {
  margin-top: 20px;
}

/* Login */
.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 52px 28px;
  overflow: hidden;
  box-sizing: border-box;
  place-items: center;
  background: #fffdfc;
  color: #292929;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page::before,
.login-page::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.login-page::before {
  top: -250px;
  left: -180px;
  width: 560px;
  height: 560px;
  background: #f7c7d2;
  box-shadow: 85vw 92vh 0 85px #bfe8f7;
}

.login-page::after {
  top: 11%;
  right: 4%;
  width: 74px;
  height: 74px;
  background-color: #f5dc69;
  background-image: radial-gradient(#fffdfc 3px, transparent 4px);
  background-size: 18px 18px;
  border-radius: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(390px, 1.08fr);
  width: min(100%, 1040px);
  min-height: 610px;
  border: 1px solid rgba(35, 59, 76, .06);
  border-radius: 32px;
  box-sizing: border-box;
  overflow: hidden;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 80px rgba(54, 75, 88, .13);
}

.login-welcome,
.login-panel {
  box-sizing: border-box;
  padding: 52px 58px;
}

.login-welcome {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffaf9;
}

.login-panel {
  align-self: center;
  border-left: 1px solid #e9edef;
}

.login-brand {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 58px;
}

.login-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 96px;
  padding: 8px 30px 16px;
  border-radius: 24px;
  box-sizing: border-box;
  background: linear-gradient(120deg, #f4abab 0 33.33%, #73cfef 33.33% 66.66%, #f6ee76 66.66% 100%);
  color: #242424;
  font-family: "Dancing Script", cursive;
  font-size: clamp(56px, 6vw, 76px);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(43, 59, 65, .12);
}

.login-heading {
  margin-bottom: 34px;
  text-align: left;
}

.login-heading h2 {
  margin: 0 0 9px;
  color: #172d39;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.15;
}

.login-heading > p:last-child {
  margin: 0;
  color: #666;
  font-size: 15px;
}

.login-welcome-copy {
  position: relative;
  z-index: 1;
}

.login-welcome-copy h1 {
  margin: 0 0 12px;
  color: #172d39;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.15;
}

.login-welcome-copy p {
  max-width: 330px;
  margin: 0;
  color: #64727a;
  font-size: 16px;
  line-height: 1.6;
}

.login-accent {
  display: block;
  width: 52px;
  height: 5px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #f4abab;
}

.login-illustration {
  position: relative;
  width: 310px;
  height: 205px;
  margin: auto auto -18px;
  border-bottom: 16px solid #f8e7d9;
  border-radius: 0 0 50% 50%;
}

.login-illustration-heart {
  position: absolute;
  top: 20px;
  left: 28px;
  color: #f28ba5;
  font-size: 68px;
  line-height: 1;
  transform: rotate(-4deg);
}

.login-illustration-heart::after {
  position: absolute;
  top: 48px;
  left: 16px;
  width: 52px;
  height: 24px;
  border-radius: 50% 50% 12px 12px;
  background: #73cfef;
  content: "";
}

.login-illustration-shelf {
  position: absolute;
  right: 22px;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  width: 142px;
  height: 112px;
  padding: 16px;
  border: 10px solid #f3d8c6;
  box-sizing: border-box;
  background: #fff;
}

.login-illustration-shelf span {
  display: block;
  width: 24px;
  border-radius: 5px 5px 0 0;
}

.login-illustration-shelf span:nth-child(1) {
  height: 64px;
  background: #73cfef;
}

.login-illustration-shelf span:nth-child(2) {
  height: 48px;
  background: #f4abab;
}

.login-illustration-shelf span:nth-child(3) {
  height: 74px;
  background: #f6ee76;
}

.login-spark {
  position: absolute;
  z-index: 1;
  font-size: 25px;
}

.login-spark--one {
  top: 8px;
  left: 5px;
  color: #f2cd45;
}

.login-spark--two {
  top: 80px;
  left: 118px;
  color: #73cfef;
}

.login-spark--three {
  right: 4px;
  bottom: 62px;
  color: #f4abab;
}

.login-form .form-field {
  margin-bottom: 20px;
}

.login-form .form-field label {
  margin-bottom: 8px;
  font-size: 14px;
}

.login-form .form-field input {
  min-height: 50px;
  padding: 12px 14px;
  border-color: rgba(76, 170, 202, .22);
  border-radius: 11px;
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 0 1px 2px rgba(43, 59, 65, .04);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-form .form-field input:focus {
  border-color: #4caaca;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(115, 207, 239, .24);
}

.login-form .form-field input::placeholder {
  color: #a0a4a6;
}

.login-password-field {
  position: relative;
}

.login-password-field input {
  padding-right: 52px !important;
}

.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  place-items: center;
  background: transparent;
  color: #69777f;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .2s ease, color .2s ease;
}

.password-visibility-button:hover {
  background: #eaf7fb;
  color: #318eaf;
}

.password-visibility-button:focus-visible {
  outline: 3px solid rgba(115, 207, 239, .35);
}

.password-eye {
  width: 22px;
  height: 22px;
}

.password-eye--hide,
.password-visibility-button[aria-pressed="true"] .password-eye--show {
  display: none;
}

.password-visibility-button[aria-pressed="true"] .password-eye--hide {
  display: block;
}

.login-form .password-visibility-option {
  margin: 0;
  font-size: 14px;
}

.login-form .password-visibility-option input {
  accent-color: #4caaca;
}

.login-form .actions {
  margin-top: 28px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.login-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #f28ba5;
}

.login-submit {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 50px;
  padding: 12px 24px;
  border: 2px solid #202020;
  border-radius: 12px;
  background: #202020;
  color: #fff;
  cursor: pointer;
  font: 800 16px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: transform .2s ease;
}

.login-submit:hover {
  border-color: transparent;
  background:
    linear-gradient(#202020, #202020) padding-box,
    linear-gradient(90deg, #f28bab 0 33.33%, #4eb7e5 33.33% 66.66%, #f4db45 66.66% 100%) border-box;
  transform: translateY(-1px);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(76, 170, 202, .45);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .login-card {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
  }

  .login-welcome {
    min-height: 265px;
    padding-bottom: 34px;
  }

  .login-welcome-copy p {
    max-width: 390px;
  }

  .login-illustration {
    position: absolute;
    right: -24px;
    bottom: 0;
    width: 235px;
    height: 155px;
    margin: 0;
    opacity: .48;
  }

  .login-panel {
    border-top: 1px solid #e9edef;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .login-page {
    min-height: 100svh;
    padding: 20px 14px;
  }

  .login-card {
    border-radius: 22px;
  }

  .login-welcome,
  .login-panel {
    padding: 32px 24px;
  }

  .login-welcome {
    min-height: auto;
  }

  .login-brand {
    margin-bottom: 38px;
  }

  .login-brand span {
    min-height: 76px;
    padding: 6px 20px 12px;
    border-radius: 18px;
    font-size: clamp(46px, 15vw, 60px);
  }

  .login-illustration {
    display: none;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

.form-select {
  width: 100%;
  padding: 10px 42px 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 7 6-7' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
}

.form-select:focus {
  border-color: #888;
  outline: none;
}

.patient-show-card {
  text-align: left;
  background: #fafafa;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 25px;
}

.patient-details-page {
  width: min(1040px, calc(100% - 40px));
  padding: 0 0 24px;
}

.patient-details-card {
  margin: 0;
}

.patient-details-card > header {
  padding: 18px 22px;
  border-bottom: 1px solid #e7e8ea;
  border-left: 5px solid #73cfef;
  background: #f4fbfd;
}

.patient-details-card h2 {
  margin: 0;
  color: #292b2e;
  font-size: 20px;
}

.patient-details-list {
  gap: 22px;
}

.patient-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 6px 22px 20px;
}

.patient-details-grid > div {
  min-width: 0;
  padding: 17px 0;
  border-bottom: 1px solid #ececef;
}

.patient-details-grid > div:nth-child(odd) {
  padding-right: 22px;
}

.patient-details-grid > div:nth-child(even) {
  padding-left: 22px;
  border-left: 1px solid #ececef;
}

.patient-details-grid dt {
  margin-bottom: 6px;
  color: #73767a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.patient-details-grid dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #292b2e;
  font-size: 15px;
  white-space: pre-line;
}

.patient-details-grid .patient-details-full-field {
  grid-column: 1 / -1;
  padding-right: 0;
  padding-left: 0;
  border-left: 0;
}

@media (max-width: 700px) {
  .patient-details-page {
    width: calc(100% - 24px);
    margin-top: 28px;
  }

  .patient-details-grid {
    grid-template-columns: 1fr;
  }

  .patient-details-grid > div,
  .patient-details-grid > div:nth-child(odd),
  .patient-details-grid > div:nth-child(even),
  .patient-details-grid .patient-details-full-field {
    grid-column: auto;
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.patient-actions-centered {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.delete-btn {
  background-color: #8b1f1f !important;
  color: #fff !important;
}

.form-errors {
  background: #ffe6e6;
  border: 1px solid #cc4b4b;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #8b1f1f;
}

.form-errors h2 {
  margin-top: 0;
  font-size: 18px;
  font-weight: bold;
}

.form-errors ul {
  margin: 10px 0 0 20px;
}

.patient-form input[type="text"],
.patient-form input[type="text"],
.patient-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.patient-row {
  padding: 10px 0;
}

.patient-link {
  font-size: 18px;
  font-weight: bold;
  color: #292929;
  text-decoration: none;
}

.patient-link:hover {
  text-decoration: underline;
  cursor: pointer;
}

.exercise-item {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
}

.result-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.result-counter {
  padding: 14px;
  border: 1px solid;
  border-radius: 8px;
  text-align: center;
}

.result-counter-success {
  border-color: #118A34;
  background: #DDF8E6;
  color: #075E22;
}

.result-counter-fail {
  border-color: #B91C2B;
  background: #FFD7DC;
  color: #7D0D18;
}

.result-counter-help {
  border-color: #0057D9;
  background: #DCEAFF;
  color: #003B91;
}

.result-counters-behavioral { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.result-counter-behavioral {
  border-color: #70757a;
  background: #f5f6f7;
  color: #25282b;
}

.result-counter-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.result-counter-label.result-counter-symbol {
  font-size: 24px;
  line-height: 1;
}

.behavioral-result-list { display: grid; gap: 18px; }
.behavioral-result-card { overflow: hidden; border: 1px solid #dfe1e3; border-radius: 10px; background: #fff; }
.behavioral-result-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4e5e7;
}
.behavioral-result-card h2 { margin: 0; font-size: 17px; }
.psico-success-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #e2f4e8;
  color: #1f6339;
}
.psico-success-summary strong { font-size: 20px; }
.psico-success-summary span { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.behavioral-result-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
}
.behavioral-result-grid > div { padding: 13px 8px; border-right: 1px solid #eceeef; text-align: center; }
.behavioral-result-grid > div:nth-child(6n) { border-right: 0; }
.behavioral-result-grid > div:nth-child(n + 7) { border-top: 1px solid #eceeef; }
.behavioral-result-grid dt { color: #62676c; font-size: 11px; font-weight: 700; }
.behavioral-result-grid dd { margin: 5px 0 0; color: #222629; font-size: 20px; font-weight: 700; }
.behavioral-result-grid .behavioral-result-symbol dt { font-size: 19px; line-height: .65; }

@media (max-width: 640px) {
  .behavioral-result-card > header { align-items: flex-start; flex-direction: column; }
  .behavioral-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .behavioral-result-grid > div:nth-child(3n) { border-right: 0; }
  .behavioral-result-grid > div:nth-child(n + 4) { border-top: 1px solid #eceeef; }
}

.result-counter-controls {
  display: grid;
  grid-template-columns: 42px minmax(34px, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.result-counter-controls form {
  margin: 0;
}

.result-counter-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.result-counter-button:hover:not(:disabled) {
  filter: brightness(0.96);
}

.result-counter-button:focus-visible {
  outline: 3px solid #202124;
  outline-offset: 2px;
}

.result-counter-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.result-counter-value {
  font-size: 25px;
  font-weight: 800;
}

.assessment-notes {
  margin: 22px 0;
  text-align: center;
}

.assessment-notes-status {
  margin: 9px 0 0;
  color: #5f6368;
  font-size: 14px;
}

.assessment-notes .absence-dialog {
  text-align: left;
}

.assessment-notes .absence-dialog label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.assessment-result-notes {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
}

.assessment-result-notes h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.assessment-result-notes-content p {
  margin: 0 0 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.assessment-result-notes-content p:last-child {
  margin-bottom: 0;
}

.item-card {
  width: 100%;
  display: block;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.dashboard-panel {
  max-width: 760px;
}

.dashboard-search,
.dashboard-form {
  text-align: left;
  margin: 20px auto;
  max-width: 560px;
}

.small-btn {
  padding: 8px 12px;
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.empty-state {
  color: #666;
  font-size: 15px;
}

.exercise-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 22px 0;
  text-align: left;
}

.exercise-request-search {
  margin-bottom: 20px;
}

.exercise-request-search-input {
  position: relative;
}

.exercise-request-search-input svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #686c72;
  stroke-linecap: round;
  stroke-width: 2;
  transform: translateY(-50%);
  pointer-events: none;
}

.exercise-request-search-input input {
  width: 100%;
  padding-left: 41px;
  box-sizing: border-box;
}

.exercise-request-search small {
  display: block;
  margin-top: 6px;
  color: #73767a;
  font-size: 12px;
}

.exercise-request-actions {
  justify-content: space-between;
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e3e5;
}

.exercise-request-actions .appointment-cancel-btn,
.exercise-request-actions .appointment-submit-btn {
  width: auto;
  margin: 0;
}

.exercise-option[hidden] {
  display: none;
}

.exercise-search-empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed #cfd2d5;
  border-radius: 8px;
  color: #686c72;
  text-align: center;
}

.selected-exercises-panel {
  position: sticky;
  z-index: 5;
  top: 76px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #ddd469;
  border-radius: 10px;
  background: #fffde5;
  box-shadow: 0 4px 14px rgba(32, 33, 36, .08);
  text-align: left;
}

.selected-exercises-panel[hidden] {
  display: none;
}

.selected-exercises-panel header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.selected-exercises-panel header strong {
  color: #292b2f;
  font-size: 14px;
}

.selected-exercises-panel header span {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  place-items: center;
  border-radius: 999px;
  background: #f6ee76;
  color: #292929;
  font-size: 12px;
  font-weight: 800;
}

.selected-exercises-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-exercise-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 9px 8px 11px;
  border: 1px solid #E4B85D;
  border-left: 4px solid #A66B00;
  border-radius: 5px;
  background: #FFECC4;
  color: #292929;
  box-shadow: 0 1px 2px rgba(32, 33, 36, .05);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.selected-exercise-chip:hover {
  border-color: #D99A16;
  border-left-color: #8A5700;
  background: #FFE2A8;
}

.selected-exercise-chip span {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  place-items: center;
  border-radius: 4px;
  background: #FFE2A8;
  color: #A66B00;
  font-size: 16px;
  line-height: 1;
}

.selected-exercise-chip:hover span {
  background: #F6D18B;
}

@media (max-width: 720px) {
  .selected-exercises-panel {
    top: 12px;
  }
}

.exercise-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}

.exercise-option input {
  margin-top: 3px;
}

.exercise-option small {
  display: block;
  margin-top: 4px;
  color: #777;
}

.assessment-exercise-card {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}

.assessment-exercise-header,
.score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.assessment-exercise-header strong {
  font-size: 19px;
}

.score-row {
  flex-wrap: wrap;
  margin-top: 8px;
  color: #333;
}

.score-row span {
  background: #f5f5f5;
  border-radius: 8px;
  font-weight: bold;
  padding: 8px 10px;
}

.score-row .score-success {
  background: #DDF8E6;
  border: 1px solid #118A34;
  color: #075E22;
}

.score-row .score-fail {
  background: #FFD7DC;
  border: 1px solid #B91C2B;
  color: #7D0D18;
}

.score-row .score-help {
  background: #DCEAFF;
  border: 1px solid #0057D9;
  color: #003B91;
}

.flash-message {
  max-width: 760px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  text-align: center;
}

.flash-message.alert {
  background: #ffe6e6;
  color: #8b1f1f;
}

.flash-message.notice {
  background: #e9f7ee;
  color: #1f6b35;
}

@media (max-width: 640px) {
  .landing-box {
    max-width: calc(100% - 32px);
    padding: 20px;
  }

  .landing-title {
    font-size: 34px;
  }

  .assessment-exercise-header {
    align-items: stretch;
    flex-direction: column;
  }

  .result-counters {
    grid-template-columns: 1fr;
  }

  .black-btn,
  .green-btn,
  .red-btn,
  .blue-btn,
  .yellow-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 10px 24px;
  box-sizing: border-box;
  border-bottom: 1px solid #dedede;
  background: #fff;
  font-family: Arial, sans-serif;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 18px 5px;
  border-radius: 14px;
  background: linear-gradient(
    120deg,
    #f4abab 0%,
    #f4abab 33.33%,
    #73cfef 33.33%,
    #73cfef 66.66%,
    #f6ee76 66.66%,
    #f6ee76 100%
  );
  color: #242424;
  font-family: "Dancing Script", cursive;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.app-nav-toggle { display: none; }

.app-nav form {
  margin: 0;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  box-sizing: border-box;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
  background: #f0f0ee;
  outline: none;
}

.app-logout {
  gap: 7px;
  margin-left: 5px;
  background: #292929;
  color: #fff;
}

.app-logout svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-logout:hover,
.app-logout:focus-visible {
  background: #444;
}

/* Agendas */
.schedule-page,
.selection-page,
.appointment-form-page {
  width: min(1440px, calc(100% - 40px));
  margin: 40px auto 48px;
  font-family: Arial, sans-serif;
  color: #242424;
}

.selection-page,
.appointment-form-page {
  max-width: 820px;
}

.schedule-header,
.selection-header,
.next-appointment,
.form-actions-row,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.schedule-header {
  margin-bottom: 24px;
}

.schedule-header h1,
.selection-header h1 {
  margin: 4px 0 6px;
  font-size: 30px;
  letter-spacing: 0;
}

.schedule-header p,
.selection-header p,
.next-appointment p {
  margin: 4px 0;
  color: #666;
}

.schedule-eyebrow {
  color: #444 !important;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.next-appointment {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(43, 59, 65, .08);
}

.next-appointment::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(
    120deg,
    #f4abab 0%,
    #f4abab 33.33%,
    #73cfef 33.33%,
    #73cfef 66.66%,
    #f6ee76 66.66%,
    #f6ee76 100%
  );
  content: "";
}

.next-appointment h2 {
  margin: 4px 0;
  font-size: 22px;
}

.schedule-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: linear-gradient(
    120deg,
    #f4abab 0%,
    #f4abab 33.33%,
    #73cfef 33.33%,
    #73cfef 66.66%,
    #f6ee76 66.66%,
    #f6ee76 100%
  );
  color: #292929;
  box-shadow: 0 4px 12px rgba(43, 59, 65, .12);
}

.schedule-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schedule-action:hover {
  filter: brightness(.96);
}

.schedule-action[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 14px;
  color: #555;
  font-size: 13px;
}

.schedule-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e2e2e2;
  background: #fff;
}

.next-slot-summary {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
}

.schedule-metrics > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 14px;
  padding: 16px 18px;
  border-right: 1px solid #e2e2e2;
}

.schedule-metrics > div:last-child {
  border-right: 0;
}

.schedule-metrics span {
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.schedule-metrics strong {
  grid-row: span 2;
  font-size: 28px;
}

.schedule-metrics small {
  color: #777;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.status-scheduled { background: #D99A16; }
.status-confirmed { background: #2f7d52; }
.status-absent { background: #A31624; }
.status-justified-absence { background: #A316A3; }
.status-in-progress { background: #376ed4; }
.status-finished { background: #292929; }

.calendar-scroll {
  overflow-x: auto;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
}

.week-calendar {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.week-calendar th,
.week-calendar td {
  border-right: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
}

.week-calendar tr:last-child th,
.week-calendar tr:last-child td {
  border-bottom: 0;
}

.week-calendar th:last-child,
.week-calendar td:last-child {
  border-right: 0;
}

.week-calendar thead th {
  height: 58px;
  padding: 8px;
  background: #f4f4f2;
  text-align: center;
}

.week-calendar thead span,
.week-calendar thead strong {
  display: block;
  text-transform: capitalize;
}

.week-calendar thead span {
  margin-bottom: 3px;
  color: #666;
  font-size: 12px;
  font-weight: 400;
}

.week-calendar .time-column {
  width: 72px;
  padding: 10px 6px;
  background: #f7f7f5;
  color: #555;
  font-size: 13px;
  text-align: center;
}

.calendar-slot {
  height: 76px;
  padding: 5px;
  vertical-align: top;
}

.admin-calendar .calendar-slot {
  height: 104px;
}

.calendar-event {
  min-height: 58px;
  padding: 8px;
  box-sizing: border-box;
  border-left: 4px solid #aaa;
  border-radius: 5px;
  background: #f2f2f2;
  overflow-wrap: anywhere;
}

.calendar-event + .calendar-event {
  margin-top: 5px;
}

.calendar-event.confirmed { border-color: #2f7d52; background: #D7F0E1; }
.calendar-event.in-progress { border-color: #376ed4; background: #D7E6FF; }
.calendar-event.finished { border-color: #292929; background: #ededed; }
.calendar-event.scheduled { border-color: #E4B85D; border-left-color: #A66B00; background: #FFECC4; }
.calendar-event.absent { border-color: #D95B67; border-left-color: #A31624; background: #FFD7DC; }
.calendar-event.justified-absence { border-color: #D95BD9; border-left-color: #A316A3; background: #FFD7FF; }

.calendar-event strong,
.calendar-event span,
.calendar-event small {
  display: block;
}

.calendar-event strong { font-size: 13px; }
.calendar-event span { margin-top: 3px; color: #555; font-size: 12px; }
.calendar-event small { margin-top: 5px; color: #666; font-size: 11px; }

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.event-actions form {
  display: inline;
}

.event-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 5px 7px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.appointment-start-button { background: #2f7d52; }
.appointment-continue-button { background: #376ed4; }

.event-button[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
}

.confirm-button { background: #2f7d52; }
.cancel-button { background: #8b1f1f; }

.selection-header {
  align-items: flex-end;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ddd;
}

.selection-header > span {
  color: #444;
  font-weight: 700;
}

.exercise-selection-form,
.appointment-form {
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.appointment-cancel-btn {
  border: 1px solid #e18f8f;
  background: #f4abab;
  color: #292929;
}

.appointment-cancel-btn:hover {
  background: #ee9999;
}

.appointment-submit-btn {
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
}

.appointment-submit-btn:hover {
  background: #5fc3e5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}

.appointment-create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-patient-field { grid-area: 1 / 1; }
.appointment-specialty-field { grid-area: 2 / 1; }
.appointment-professional-field { grid-area: 2 / 2; }
.appointment-day-field { grid-area: 3 / 1; }
.appointment-time-field { grid-area: 3 / 2; }

.duration-note {
  margin: 4px 0 20px;
  color: #555;
  font-size: 14px;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid #d8dadd;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}

.checkbox-option input {
  margin-top: 3px;
}

.checkbox-option strong,
.checkbox-option small {
  display: block;
}

.checkbox-option small {
  margin-top: 4px;
  color: #666;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .app-brand {
    justify-self: start;
    width: auto;
    min-height: 40px;
    padding: 2px 14px 4px;
    box-sizing: border-box;
    font-size: 27px;
  }

  .app-header {
    position: sticky;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  }

  .app-nav {
    display: none;
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-height: calc(100dvh - 82px);
    padding-top: 8px;
    overflow-y: auto;
    border-top: 1px solid #e5e5e5;
  }

  .app-header.is-menu-open .app-nav { display: flex; }

  .app-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d8dadd;
    border-radius: 8px;
    background: #fff;
    color: #292929;
    cursor: pointer;
  }

  .app-nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }

  .is-menu-open .app-nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .is-menu-open .app-nav-toggle span:nth-child(2) { opacity: 0; }
  .is-menu-open .app-nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .app-nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .app-nav form { width: 100%; }
  .app-logout {
    margin-left: 0;
  }

  .schedule-page,
  .selection-page,
  .appointment-form-page {
    width: calc(100% - 24px);
    margin-top: 32px;
  }

  .schedule-header,
  .selection-header,
  .next-appointment,
  .form-actions-row {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-header h1,
  .selection-header h1 {
    font-size: 25px;
  }

  .header-actions,
  .form-actions-row {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .appointment-create-grid > .form-field { grid-area: auto; }

  .schedule-metrics {
    grid-template-columns: 1fr;
  }

  .schedule-metrics > div {
    border-right: 0;
    border-bottom: 1px solid #e2e2e2;
  }

  .schedule-metrics > div:last-child {
    border-bottom: 0;
  }

  .exercise-selection-form,
  .appointment-form {
    padding: 16px;
  }
}

/* Dashboard diário do admin */
.daily-dashboard {
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 56px;
  color: #202124;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.daily-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dfe1e5;
}

.daily-header h1 {
  margin: 3px 0 0;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.daily-header > time {
  color: #5f6368;
  font-size: 15px;
  font-weight: 650;
  text-transform: capitalize;
}

.daily-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 22px 0 38px;
  overflow: hidden;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.05);
}

.daily-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 11px;
  min-height: 86px;
  padding: 18px;
  box-sizing: border-box;
  border-right: 1px solid #e4e5e7;
}

.daily-metrics > div:last-child {
  border-right: 0;
}

.daily-metrics > div:nth-child(1) { background: #F1F1F1; box-shadow: inset 0 3px #5F6368; }
.daily-metrics > div:nth-child(2) { background: #FFECC4; box-shadow: inset 0 3px #D99A16; }
.daily-metrics > div:nth-child(3) { background: #D7F0E1; box-shadow: inset 0 3px #2F7D52; }
.daily-metrics > div:nth-child(4) { background: #D7E6FF; box-shadow: inset 0 3px #376ED4; }
.daily-metrics > div:nth-child(5) { background: #EDEDED; box-shadow: inset 0 3px #292929; }
.daily-metrics > div:nth-child(6) { background: #FFD7DC; box-shadow: inset 0 3px #A31624; }
.daily-metrics > div:nth-child(7) { background: #FFD7FF; box-shadow: inset 0 3px #A316A3; }

.daily-metrics > div:nth-child(1) strong { color: #5F6368; }
.daily-metrics > div:nth-child(2) strong { color: #A66B00; }
.daily-metrics > div:nth-child(3) strong { color: #2F7D52; }
.daily-metrics > div:nth-child(4) strong { color: #376ED4; }
.daily-metrics > div:nth-child(5) strong { color: #292929; }
.daily-metrics > div:nth-child(6) strong { color: #A31624; }
.daily-metrics > div:nth-child(7) strong { color: #A316A3; }

.daily-metrics strong {
  font-size: 34px;
  line-height: 1;
}

.daily-metrics span {
  color: #5f6368;
  font-size: 15px;
  font-weight: 650;
}

.next-hour-section > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}

.next-hour-section h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.in-progress-panel {
  margin-bottom: 36px;
}

.in-progress-panel .appointment-action-card {
  min-height: 0;
}

.in-progress-panel .appointment-action-card.is-overdue {
  border-top-color: #D97706;
}

.in-progress-panel .appointment-action-card.is-overdue > header strong {
  background: #FFF0CE;
  color: #8A5700;
}

.in-progress-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.in-progress-card-actions .attendance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.appointment-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.appointment-filter-field {
  width: min(100%, 280px);
}

.appointment-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: #55585d;
  font-size: 12px;
  font-weight: 700;
}

.appointment-status-filter-field {
  flex: 1 1 560px;
  width: auto;
}

.appointment-filter-label {
  display: block;
  margin-bottom: 6px;
  color: #55585d;
  font-size: 12px;
  font-weight: 700;
}

.appointment-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.appointment-status-filter {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.appointment-status-filter.is-all { border-color: #aeb1b5; background: #F1F1F1; color: #5F6368; }
.appointment-status-filter.is-scheduled { border-color: #D99A16; background: #FFECC4; color: #A66B00; }
.appointment-status-filter.is-confirmed { border-color: #2F7D52; background: #D7F0E1; color: #2F7D52; }
.appointment-status-filter.is-absent { border-color: #A31624; background: #FFD7DC; color: #A31624; }
.appointment-status-filter.is-justified-absence { border-color: #A316A3; background: #FFD7FF; color: #A316A3; }
.appointment-status-filter.is-in-progress { border-color: #376ED4; background: #D7E6FF; color: #376ED4; }
.appointment-status-filter.is-finished { border-color: #292929; background: #EDEDED; color: #292929; }

.appointment-status-filter.is-active.is-all { background: #5F6368; color: #fff; }
.appointment-status-filter.is-active.is-scheduled { background: #D99A16; color: #30230A; }
.appointment-status-filter.is-active.is-confirmed { background: #2F7D52; color: #fff; }
.appointment-status-filter.is-active.is-absent { background: #A31624; color: #fff; }
.appointment-status-filter.is-active.is-justified-absence { background: #A316A3; color: #fff; }
.appointment-status-filter.is-active.is-in-progress { background: #376ED4; color: #fff; }
.appointment-status-filter.is-active.is-finished { background: #292929; color: #fff; }

.appointment-time-group + .appointment-time-group {
  margin-top: 28px;
}

.appointment-time-group > h3 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfe1e5;
  color: #3c4043;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.appointment-time-group[hidden] {
  display: none;
}

.filtered-appointments-empty {
  margin-top: 0;
}

.filtered-appointments-empty[hidden] {
  display: none;
}

.next-hour-time {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-align: right;
}

.next-hour-time time {
  color: #5f6368;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

.next-hour-time strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.appointment-action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.appointment-action-card {
  min-height: 226px;
  padding: 18px;
  box-sizing: border-box;
  border: 1px solid #d8dadd;
  border-top: 4px solid #aeb1b5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.06);
}

.appointment-action-card.scheduled { border-top-color: #D99A16; }
.appointment-action-card.confirmed { border-top-color: #2F7D52; }
.appointment-action-card.absent { border-top-color: #A31624; }
.appointment-action-card.justified-absence { border-top-color: #A316A3; }
.appointment-action-card.in-progress { border-top-color: #376ED4; }
.appointment-action-card.finished { border-top-color: #4a4d52; }

.appointment-action-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid #ececef;
}

.appointment-action-card > header span {
  color: #777b80;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.appointment-action-card > header strong {
  padding: 4px 7px;
  border-radius: 4px;
  background: #eceeef;
  color: #55585d;
  font-size: 10px;
  text-transform: uppercase;
}

.appointment-action-card.scheduled > header strong {
  background: #FFE2A8;
  color: #A66B00;
}

.appointment-action-card.confirmed > header strong {
  background: #dcefe4;
  color: #24613f;
}

.appointment-action-card.absent > header strong {
  background: #f5dddd;
  color: #852f2f;
}

.appointment-action-card.justified-absence > header strong {
  background: #F5B8F5;
  color: #A316A3;
}

.appointment-action-card.in-progress > header strong {
  background: #BCD3FA;
  color: #2755A5;
}

.appointment-action-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 17px 0;
}

.appointment-action-card dt {
  margin-bottom: 5px;
  color: #777b80;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-action-card dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dashboard-appointment-management {
  display: contents;
}

.dashboard-appointment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: -5px 0 12px;
}

.in-progress-card-actions .dashboard-appointment-actions {
  margin: 0 auto 0 0;
}

.dashboard-appointment-action {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d7d9dc;
  border-radius: 6px;
  background: #fff;
  color: #55585d;
  cursor: pointer;
}

.dashboard-appointment-action:hover {
  background: #f2f3f4;
}

.dashboard-appointment-action.delete-event-button {
  border-color: #e3b2b7;
  color: #A31624;
}

.dashboard-appointment-action.delete-event-button:hover {
  background: #FFE8EB;
}

.dashboard-appointment-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.appointment-edit-actions .attendance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.appointment-edit-actions .attendance-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.appointment-edit-actions .attendance-neutral {
  border-color: #D95B67;
  background: #FFD7DC;
  color: #A31624;
}

.appointment-edit-actions .attendance-neutral:hover {
  background: #F5B8C0;
}

.appointment-edit-actions .attendance-save {
  border-color: #376ED4;
  background: #D7E6FF;
  color: #2755A5;
}

.appointment-edit-actions .attendance-save:hover {
  background: #BCD3FA;
}

.absence-reason {
  margin: -3px 0 15px;
  padding: 9px 11px;
  border-left: 3px solid #A316A3;
  background: #FBE5FB;
  color: #751075;
  font-size: 13px;
}

.attendance-actions {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.15fr;
  gap: 7px;
  margin-top: auto;
}

.attendance-actions form {
  display: contents;
}

.attendance-button {
  min-height: 38px;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.attendance-confirm {
  background: #2f7d52;
  color: #fff;
}

.attendance-confirm:hover { background: #286b46; }

.attendance-absent {
  border-color: #D95B67;
  background: #FFD7DC;
  color: #A31624;
}

.attendance-absent:hover { background: #F5B8C0; }

.attendance-justified {
  border-color: #D95BD9;
  background: #FFD7FF;
  color: #A316A3;
}

.attendance-justified:hover { background: #F5B8F5; }

.attendance-neutral {
  border-color: #c9cbcf;
  background: #fff;
  color: #55585d;
}

.attendance-neutral:hover { background: #f1f2f3; }

.attendance-save {
  background: #202124;
  color: #fff;
}

.attendance-save:hover { background: #3c4043; }

.attendance-danger { background: #9d3342; color: #fff; }
.attendance-danger:hover { background: #7f2633; }
.form-help { margin: 10px 0 0; color: #62676c; font-size: 12px; }
.appointment-audit-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.appointment-audit-table td { vertical-align: top; }
.appointment-audit-table small { color: #62676c; }
.audit-action { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef0f2; font-size: 11px; font-weight: 800; white-space: nowrap; }
.audit-action-cancelled { background: #f9e2e5; color: #873e49; }

@media (max-width: 760px) {
  .appointment-audit-filter-grid { grid-template-columns: 1fr; }
}

.daily-empty-state {
  padding: 48px 24px;
  border: 1px dashed #c9cbcf;
  border-radius: 8px;
  color: #5f6368;
  text-align: center;
}

.daily-empty-state strong {
  color: #303236;
  font-size: 17px;
}

.daily-empty-state p {
  margin: 7px 0 0;
}

.absence-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.absence-dialog::backdrop {
  background: rgba(26, 28, 31, 0.56);
}

.absence-dialog form {
  padding: 22px;
}

.absence-dialog header,
.absence-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.absence-dialog header {
  margin-bottom: 20px;
}

.absence-dialog h3 {
  margin: 3px 0 0;
  font-size: 21px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f1f2;
  color: #45484c;
  cursor: pointer;
  font-size: 23px;
  line-height: 34px;
}

.absence-dialog textarea {
  width: 100%;
  padding: 11px 12px;
  box-sizing: border-box;
  border: 1px solid #cfd1d4;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.absence-dialog footer {
  justify-content: flex-end;
  margin-top: 20px;
}

.absence-dialog footer .yellow-btn,
.absence-dialog footer .black-btn {
  margin: 0;
}

.absence-dialog .assessment-notes-footer {
  justify-content: center;
}

.assessment-notes-footer .yellow-btn,
.assessment-notes-footer .black-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.assessment-notes-footer svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appointment-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-calendar .calendar-event.absent {
  border-color: #D95B67;
  border-left-color: #A31624;
  background: #FFD7DC;
}

.admin-calendar .calendar-event.justified-absence {
  border-color: #D95BD9;
  border-left-color: #A316A3;
  background: #FFD7FF;
}

.admin-calendar .calendar-event.scheduled {
  border-color: #E4B85D;
  border-left-color: #A66B00;
  background: #FFECC4;
}

@media (max-width: 760px) {
  .daily-dashboard {
    width: calc(100% - 24px);
    margin-top: 28px;
  }

  .daily-header,
  .next-hour-section > header,
  .next-hour-time {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }

  .daily-header h1 { font-size: 27px; }

  .daily-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 30px;
  }

  .daily-metrics > div:first-child {
    grid-column: 1 / -1;
    align-items: baseline;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    min-height: 68px;
  }

  .daily-metrics > div {
    align-items: center;
    flex-direction: column;
    gap: 5px;
    min-height: 84px;
    padding: 13px 5px;
    text-align: center;
  }

  .daily-metrics strong { font-size: 28px; }
  .daily-metrics span { font-size: 12px; }

  .appointment-action-list {
    grid-template-columns: 1fr;
  }

  .appointment-action-card dl {
    gap: 6px;
  }

  .appointment-action-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 87px;
    column-gap: 10px;
  }

  .appointment-action-card > header {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .appointment-action-card > dl {
    grid-column: 1;
    grid-row: 2;
  }

  .appointment-action-card > .absence-reason {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .appointment-action-card > .in-progress-card-actions {
    grid-column: 1 / -1;
  }

  .attendance-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: auto;
  }

  .attendance-actions form:first-child .attendance-button {
    grid-column: 1 / -1;
  }

  .attendance-actions .attendance-button {
    width: 100%;
    min-height: 48px;
    padding: 8px 7px;
    white-space: normal;
  }

  .dashboard-appointment-actions {
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    width: 87px;
    margin: 17px 0;
    padding: 0;
    border-top: 0;
    border-left: 0;
  }

  .in-progress-card-actions .dashboard-appointment-actions {
    order: initial;
    flex-direction: row;
    width: auto;
    margin: 0 auto 0 0;
    padding: 0;
    border-top: 0;
    border-left: 0;
  }

  .in-progress-card-actions .dashboard-appointment-action {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .absence-dialog footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

/* Relatório de atendimentos */
.report-page {
  width: min(1180px, calc(100% - 40px));
  margin: 44px auto 72px;
  color: #202124;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.report-page-header {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #dfe1e5;
}

.report-page-header h1,
.report-results-header h2 {
  margin: 4px 0 7px;
  font-size: 32px;
  line-height: 1.15;
}

.report-page-header p,
.report-results-header p {
  margin: 0;
  color: #676b70;
}

.report-eyebrow {
  color: #91640d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.report-filter-panel {
  padding: 24px;
  border: 1px solid #d9dbde;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(32, 33, 36, .06);
}

.report-section-heading,
.report-section-heading > div,
.report-results-header,
.report-results-tools {
  display: flex;
  align-items: center;
}

.report-section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.report-section-heading > div { gap: 11px; }

.report-section-heading > div > span,
.report-card-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #242526;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.report-section-heading h2 { margin: 0; font-size: 20px; }
.report-section-heading small { color: #73767a; }
.report-section-heading small b,
.report-filter-form label span { color: #a31624; }

.report-filter-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(2, minmax(155px, .7fr));
  gap: 18px;
}

.report-filter-grid .form-field:nth-child(4) { grid-column: 1 / 2; }
.report-filter-grid .form-field:nth-child(5) { grid-column: 2 / 4; }

.report-filter-form label {
  display: block;
  margin-bottom: 7px;
  color: #45484c;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.report-filter-form .form-select,
.report-filter-form .form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid #cfd2d5;
  border-radius: 6px;
  background: #fff;
  color: #292b2e;
  font: inherit;
}

.report-filter-form .form-select:focus,
.report-filter-form .form-input:focus {
  border-color: #91640d;
  outline: 3px solid rgba(217, 154, 22, .16);
}

.report-filter-form .form-select:disabled { background: #f3f4f4; color: #898c90; }
.field-hint { display: block; margin-top: 6px; color: #777b80; font-size: 12px; }

.report-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ececef;
}

.report-clear-link { color: #5f6368; font-size: 13px; font-weight: 700; }

.report-submit,
.report-print-button {
  padding: 11px 19px;
  border: 0;
  border-radius: 5px;
  background: #242526;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.report-submit:hover,
.report-print-button:hover { background: #3a3b3c; }

.report-submit {
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
}

.report-submit:hover {
  background: #5fc3e5;
}

.report-generate-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.report-generate-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-errors {
  margin-bottom: 20px;
  padding: 13px 16px;
  border-left: 4px solid #a31624;
  background: #fff0f1;
  color: #76222a;
  font-size: 13px;
}

.report-errors ul { margin: 7px 0 0; padding-left: 20px; }

.report-results { margin-top: 40px; }

.report-results-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.report-results-tools { gap: 7px; }
.report-results-tools > strong { font-size: 30px; }
.report-results-tools > span { margin-right: 15px; color: #6c7074; font-size: 13px; }
.report-print-button { padding: 9px 15px; border: 1px solid #cfd2d5; background: #fff; color: #333538; }
.report-print-button:hover { background: #f3f3f2; }

.report-assessment-list { display: grid; gap: 18px; }

.report-assessment-card {
  overflow: hidden;
  border: 1px solid #d9dbde;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(32, 33, 36, .045);
}

.report-assessment-card > header {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 19px 21px;
  border-bottom: 1px solid #e7e8ea;
  background: #fafafa;
}

.report-card-number { background: #73cfef; color: #292929; }
.report-card-title time { color: #777b80; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.report-card-title h3 { margin: 4px 0 2px; font-size: 18px; }
.report-card-title p { margin: 0; color: #686c72; font-size: 12px; }

.report-score-summary { display: flex; gap: 8px; margin: 0; }
.report-score-summary > div { min-width: 67px; padding: 8px 10px; border-radius: 5px; text-align: center; }
.report-score-summary dt { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.report-score-summary dd { margin: 3px 0 0; font-size: 20px; font-weight: 800; }
.score-success { background: #dcefe4; color: #24613f; }
.score-help { background: #fff0ce; color: #795312; }
.score-fail { background: #f5dddd; color: #852f2f; }

.report-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .8fr);
  gap: 22px;
  padding: 21px;
}

.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { padding: 9px 10px; border-bottom: 2px solid #dadcde; color: #666a6e; font-size: 10px; text-align: center; text-transform: uppercase; }
.report-table th:first-child,
.report-table td:first-child { text-align: left; }
.report-table td { padding: 10px; border-bottom: 1px solid #ececef; text-align: center; }

.attendance-report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.attendance-report-table-wrapper { overflow-x: auto; }
.attendance-report-table { min-width: 720px; font-size: 14px; }
.attendance-report-table th:first-child { white-space: nowrap; }
.attendance-report-table tbody th { padding: 13px 10px; border-bottom: 1px solid #ececef; font-weight: 600; text-align: left; }
.attendance-report-table tfoot th,
.attendance-report-table tfoot td { padding: 14px 10px; border-top: 2px solid #50565a; background: #f3f4f4; font-weight: 700; text-align: center; }
.attendance-report-table tfoot th { text-align: left; }
.attendance-report-table .attendance-report-empty { padding: 28px 12px; color: #70757a; text-align: center; }

.appointment-location-fieldset {
  margin: 20px 0;
  padding: 0;
  border: 0;
}

.appointment-location-fieldset legend {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

.appointment-location-options { display: flex; gap: 12px; }
.appointment-location-options label {
  display: flex;
  min-width: 130px;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid #d7d9dc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.appointment-location-options label:has(input:checked) { border-color: #1f2326; background: #f3f4f4; }
.appointment-location-options input { accent-color: #1f2326; }
.appointment-location-fieldset-compact { grid-column: 1 / -1; margin: 0; }

.report-notes { padding: 16px; border-left: 3px solid #d99a16; background: #fffaf0; font-size: 13px; line-height: 1.55; }
.report-notes > strong { display: block; margin-bottom: 8px; color: #5f5140; font-size: 11px; text-transform: uppercase; }
.report-notes p { margin: 0 0 8px; }
.report-notes p:last-child { margin-bottom: 0; }

.report-empty-state { padding: 52px 24px; border: 1px dashed #c8cbd0; border-radius: 9px; color: #676b70; text-align: center; }
.report-empty-state strong { color: #303236; font-size: 18px; }
.report-empty-state p { margin: 7px 0 0; }

.training-report-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.behavioral-training-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-exercise-search { position: relative; }
.report-exercise-search small { display: block; margin-top: 5px; color: #62676c; font-size: 11px; }
.report-exercise-search-results {
  position: absolute;
  z-index: 20;
  top: 70px;
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #cfd2d5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(32, 33, 36, .15);
}
.report-exercise-search-results[hidden] { display: none; }
.report-exercise-search-results button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eceeef;
  background: #fff;
  color: #292b2e;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.report-exercise-search-results button[hidden] { display: none; }
.report-exercise-search-results button:hover { background: #f3f4f4; }
.report-exercise-search-results p { margin: 0; padding: 12px; color: #62676c; font-size: 12px; }
.training-report-date-range {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.behavioral-daily-chart-wrapper { overflow-x: auto; padding: 10px; border: 1px solid #d9dbde; border-radius: 9px; background: #fff; }
.behavioral-daily-chart { display: block; width: 100%; min-width: 520px; height: 330px; }
.behavioral-chart-grid-line { stroke: #e0e2e4; stroke-width: 1; }
.behavioral-chart-axis-label,
.behavioral-chart-day-label,
.behavioral-chart-x-title,
.behavioral-chart-y-title { fill: #62676c; font-family: Arial, sans-serif; font-size: 9px; }
.behavioral-chart-x-title,
.behavioral-chart-y-title { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.behavioral-chart-bar { fill: #f4abab; }
.behavioral-chart-value { fill: #873e49; font-family: Arial, sans-serif; font-size: 11px; font-weight: 800; }

.training-report-filter-grid .form-field:nth-child(4) {
  grid-column: auto;
}

.training-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.training-chart-card {
  padding: 20px;
  border: 1px solid #d9dbde;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(32, 33, 36, .045);
}

.training-chart-card h3 {
  margin: 0 0 18px;
  color: #303236;
  font-size: 17px;
  text-align: center;
}

.training-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 15px;
  height: 245px;
}

.training-chart-series {
  display: grid;
  grid-template-rows: 24px 180px 20px;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.training-chart-series > strong {
  font-size: 16px;
}

.training-chart-series > small {
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
}

.training-chart-column {
  display: block;
  width: 100%;
  height: 180px;
  overflow: visible;
}

.training-chart-column line {
  stroke: #cfd2d5;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.training-chart-column rect {
  fill: currentColor;
}

.training-chart-success { color: #33758c; }
.training-chart-success .training-chart-column rect { fill: #73cfef; }
.training-chart-help { color: #795312; }
.training-chart-help .training-chart-column rect { fill: #f6ee76; }
.training-chart-fail { color: #852f2f; }
.training-chart-fail .training-chart-column rect { fill: #dc8585; }

@media (max-width: 760px) {
  .report-page { width: calc(100% - 24px); margin-top: 28px; }
  .report-page-header h1 { font-size: 27px; }
  .report-filter-panel { padding: 17px; }
  .report-section-heading,
  .report-results-header { align-items: flex-start; flex-direction: column; }
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-filter-grid .form-field:nth-child(4),
  .report-filter-grid .form-field:nth-child(5) { grid-column: auto; }
  .report-filter-actions { justify-content: space-between; }
  .report-assessment-card > header { grid-template-columns: auto 1fr; }
  .report-score-summary { grid-column: 1 / -1; width: 100%; }
  .report-score-summary > div { flex: 1; min-width: 0; }
  .report-card-content { grid-template-columns: 1fr; padding: 15px; }
  .report-table { font-size: 12px; }
  .report-table th,
  .report-table td { padding: 8px 5px; }
  .attendance-report-filter-grid { grid-template-columns: 1fr; }
  .training-report-filter-grid,
  .behavioral-training-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-report-filter-grid > .form-field,
  .behavioral-training-filter-grid > .form-field { grid-column: 1 / -1; }
  .training-chart-grid { grid-template-columns: 1fr; }
}

/* Gestão de usuários */
.users-page {
  max-width: 1120px;
}

.users-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.users-header h1 {
  margin: 3px 0 7px;
  color: #202124;
  font-size: 34px;
  letter-spacing: -0.8px;
}

.users-header > div > p:last-child {
  margin: 0;
  color: #686b70;
  font-size: 15px;
}

.users-eyebrow {
  margin: 0;
  color: #9b6a08;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.users-new-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 11px 17px;
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.18);
}

.users-new-button:hover {
  background: #5fc3e5;
}

.users-new-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.users-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.users-summary article {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #e1e3e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.04);
}

.users-summary article div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.users-summary article strong {
  color: #202124;
  font-size: 24px;
  line-height: 1.05;
}

.users-summary article div span {
  margin-top: 4px;
  color: #707379;
  font-size: 13px;
}

.users-summary-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
}

.users-summary-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.users-summary-icon-total { background: #d5f2fc; color: #33758c; }
.users-summary-icon-active { background: #e5f5eb; color: #217346; }
.users-summary-icon-inactive { background: #fbe0e0; color: #a45d5d; }

.users-panel {
  overflow: hidden;
  border: 1px solid #dcdee1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(32, 33, 36, 0.07);
}

.users-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid #e7e8ea;
}

.users-panel-header h2,
.users-panel-header p {
  margin: 0;
}

.users-panel-header h2 {
  color: #282a2d;
  font-size: 18px;
}

.users-panel-header p {
  margin-top: 4px;
  color: #74777c;
  font-size: 13px;
}

.users-panel-header > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f3f4;
  color: #5d6065;
  font-size: 12px;
  font-weight: 700;
}

.management-search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: none;
  margin: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #e7e8ea;
}

.management-search .form-field {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.management-search .patients-search-button {
  flex: 0 0 auto;
  margin: 0;
}

.management-edit-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  text-align: left;
}

.management-edit-dialog .management-modal-form {
  display: block;
}

.management-edit-dialog header p {
  margin: 4px 0 0;
  color: #74777c;
  font-size: 13px;
}

.management-modal-content {
  padding: 22px;
  overflow-y: auto;
}

.user-modal-full-field {
  grid-column: 1 / -1;
}

.user-modal-username-field {
  grid-column: 1 / -1;
  width: calc(50% - 7px);
}

@media (max-width: 760px) {
  .user-modal-username-field {
    width: 100%;
  }
}

.management-modal-hint {
  margin: 20px 0 14px;
  color: #686b70;
  font-size: 13px;
}

.management-edit-dialog footer .yellow-btn,
.management-edit-dialog footer .black-btn {
  margin: 0;
}

.patient-form-section + .patient-form-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e1e3e6;
}

.form-actions-row.patient-form-actions,
.absence-dialog footer.patient-form-actions {
  justify-content: center;
}

.patient-form-actions .yellow-btn,
.patient-form-actions .black-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.patient-form-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.patient-form-section h4 {
  margin: 0 0 18px;
  color: #292b2e;
  font-size: 17px;
}

.patient-registration-grid {
  gap: 0 18px;
}

.patient-form-full-field {
  grid-column: 1 / -1;
}

.patient-invoice-field {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.patient-invoice-divider {
  margin: 26px 0 22px;
  border: 0;
  border-top: 1px solid #e1e3e6;
}

.patient-invoice-field legend {
  margin-bottom: 9px;
  color: #333;
  font-weight: bold;
}

.patient-radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.patient-radio-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  padding: 11px 14px;
  border: 1px solid #cfd2d5;
  border-radius: 8px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-weight: 700;
}

.patient-radio-options label:has(input:checked) {
  border-color: #55b9db;
  background: #d5f2fc;
}

.patient-radio-options input[type="radio"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #33758c;
}

.patient-registration-grid textarea {
  width: 100%;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

@media (max-width: 760px) {
  .patient-registration-grid {
    grid-template-columns: 1fr;
  }

  .patient-form-full-field {
    grid-column: auto;
  }
}

.users-identity a {
  color: inherit;
  text-decoration: none;
}

.users-identity a:hover {
  text-decoration: underline;
}

.users-table-wrapper {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.users-table th {
  padding: 11px 16px;
  border-bottom: 1px solid #dedfe2;
  background: #f7f8f9;
  color: #6d7075;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  white-space: nowrap;
}

.users-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #eceef0;
  color: #3f4247;
  font-size: 13px;
  vertical-align: middle;
}

.users-table tbody tr:last-child td {
  border-bottom: 0;
}

.users-table tbody tr:hover {
  background: #fffaf0;
}

.users-table tbody tr.is-inactive {
  background: #fafafa;
}

.users-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 180px;
}

.users-identity > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.users-identity strong {
  color: #292b2f;
  font-size: 14px;
}

.users-identity small {
  color: #85888d;
  font-size: 11px;
}

.users-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #d5f2fc;
  color: #33758c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.is-inactive .users-avatar {
  background: #d5f2fc;
  color: #33758c;
}

.users-edit-button,
.patients-edit-button,
.exercises-edit-button {
  border: 1px solid #ddd469;
  background: #f6ee76;
  color: #292929;
}

.assessment-notes-button {
  border: 1px solid #ddd469;
  background: #f6ee76;
  color: #292929;
}

.assessment-notes-button:hover {
  background: #eee567;
}

.assessment-notes-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.assessment-notes-actions .yellow-btn,
.assessment-notes-actions .black-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  margin: 0;
  cursor: pointer;
}

.assessment-notes-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assessment-finish-button {
  border: 1px solid #0A6F28;
  background: #118A34;
  color: #fff;
}

.assessment-finish-button:hover {
  background: #0A6F28;
}

.my-assessments-filter-grid {
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(170px, 1fr));
}

.my-assessments-search-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.my-assessments-search-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.my-assessments-results {
  margin-top: 24px;
}

.my-assessments-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.my-assessments-results-heading h2 {
  margin: 4px 0 0;
}

.my-assessments-results-heading small {
  color: #686c72;
}

.my-assessments-list {
  display: grid;
  gap: 14px;
}

.my-assessment-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 19px 20px;
  overflow: hidden;
  border: 1px solid #dfe1e5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(32, 33, 36, 0.05);
}

.my-assessment-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #73cfef;
  content: "";
}

.my-assessment-card.is-finished::before {
  background: #78B990;
}

.my-assessment-main {
  flex: 1;
  min-width: 0;
}

.my-assessment-title-row,
.my-assessment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.my-assessment-title-row {
  margin-top: 8px;
}

.my-assessment-title-row h3 {
  margin: 0;
}

.my-assessment-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dce7f9;
  color: #2755a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.my-assessment-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.is-finished .my-assessment-status {
  background: #d9eee2;
  color: #24613f;
}

.my-assessment-card h3 {
  margin: 8px 0 0;
  color: #292b2f;
  font-size: 19px;
}

.my-assessment-datetime {
  color: #202124;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.my-assessment-footer {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #eceef0;
}

.my-assessment-scores {
  display: flex;
  gap: 7px;
  margin: 0;
}

.my-assessment-scores > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 5px;
}

.my-assessment-scores dt {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.my-assessment-scores dd {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.my-assessment-scores .score-training { background: #eef0f2; color: #444a50; }

.my-assessment-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
  font-size: 13px;
  box-shadow: none;
}

.my-assessment-edit-button.is-edit {
  border-color: #ddd469;
  background: #f6ee76;
}

.my-assessment-edit-button.is-continue:hover {
  background: #5fc3e5;
}

.my-assessment-edit-button.is-edit:hover {
  background: #eee567;
}

.my-assessment-edit-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .my-assessments-filter-grid {
    grid-template-columns: 1fr;
  }

  .my-assessments-results-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .my-assessment-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .my-assessment-datetime {
    white-space: normal;
  }

  .my-assessment-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .my-assessment-scores > div {
    align-items: center;
    flex-direction: column;
  }

  .my-assessment-edit-button {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
  }
}

.users-edit-button:hover,
.patients-edit-button:hover,
.exercises-edit-button:hover {
  background: #eee567;
}

.users-deactivate-button,
.patients-deactivate-button,
.exercises-deactivate-button {
  border: 1px solid #e18f8f;
  background: #f4abab;
  color: #292929;
}

.users-deactivate-button:hover,
.patients-deactivate-button:hover,
.exercises-deactivate-button:hover {
  background: #ee9999;
}

.exercise-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid #e1e3e6;
  border-radius: 12px;
  background: #fff;
}

.exercise-filters .form-field {
  margin: 0;
}

.exercise-search-field {
  flex: 1;
}

.exercise-search-button,
.exercise-clear-filters {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.exercise-search-button {
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
}

.exercise-search-button:hover {
  background: #5fc3e5;
}

.exercise-clear-filters {
  border: 1px solid #e18f8f;
  background: #f4abab;
  color: #292929;
}

.exercise-clear-filters:hover {
  background: #ee9999;
}

.exercise-specialized-fields {
  display: grid;
  gap: 12px;
}

.exercise-specialized-fields[hidden],
[data-exercise-fields-target="general"][hidden] {
  display: none;
}

@media (max-width: 720px) {
  .exercise-filters {
    align-items: stretch;
    flex-direction: column;
  }
}

.patients-search-button {
  border: 1px solid #55b9db;
  background: #73cfef;
  color: #292929;
}

.patients-search-button:hover {
  background: #5fc3e5;
}

.patients-search-button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  font-size: 14px;
  cursor: pointer;
}

.patients-search-button-with-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.users-username {
  color: #555a61;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.users-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.users-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.users-status.is-active { background: #e5f5eb; color: #217346; }
.users-status.is-inactive { background: #eceef0; color: #656970; }

.users-actions {
  min-width: 108px;
  text-align: right;
  white-space: nowrap;
}

.users-page .user-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 2px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 8px;
  box-shadow: none;
  line-height: 1;
}

.users-page .user-action-btn svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.users-page .user-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(32, 33, 36, 0.16);
}

.users-page .user-action-btn:focus-visible,
.users-new-button:focus-visible {
  outline: 3px solid rgba(0, 87, 217, 0.3);
  outline-offset: 2px;
}

.users-protected {
  color: #8a8d92;
  font-size: 11px;
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .users-header {
    align-items: stretch;
    flex-direction: column;
  }

  .users-new-button {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .users-summary {
    grid-template-columns: 1fr;
  }

  .users-summary article {
    padding: 14px 16px;
  }

  .users-summary--primary-total {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .users-summary--primary-total article:first-child {
    grid-column: 1 / -1;
    min-height: 72px;
  }

  .users-summary--primary-total article:not(:first-child) {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 118px;
    padding: 14px;
    box-sizing: border-box;
  }

  .users-summary--primary-total article:not(:first-child) .users-summary-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .users-summary--primary-total article:not(:first-child) .users-summary-icon svg {
    width: 18px;
    height: 18px;
  }

  .users-summary--primary-total article:not(:first-child) strong {
    font-size: 22px;
  }

  .users-table-wrapper {
    overflow: visible;
  }

  .users-table thead {
    display: none;
  }

  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .users-table tr {
    padding: 13px 16px;
    border-bottom: 1px solid #e5e6e8;
  }

  .users-table tbody tr:last-child {
    border-bottom: 0;
  }

  .users-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .users-table td::before {
    content: attr(data-label);
    color: #85888d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
  }

  .users-table td:first-child {
    padding-bottom: 13px;
  }

  .users-table td:first-child::before {
    display: none;
  }

  .users-identity {
    width: 100%;
    text-align: left;
  }

  .users-table td.users-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    text-align: left;
  }

  .users-actions .inline-form {
    display: block;
    flex: 0 0 auto;
    margin: 0;
  }

  .users-page .user-action-btn {
    display: inline-flex;
    width: 36px;
    height: 36px;
    margin: 0;
  }

  .users-page .users-actions > .user-action-btn {
    margin-left: auto;
  }
}

@media print {
  .app-header,
  .flash-message,
  .report-page-header,
  .report-filter-panel,
  .report-print-button { display: none !important; }
  .report-page { width: 100%; margin: 0; }
  .report-results { margin: 0; }
  .report-assessment-card { break-inside: avoid; box-shadow: none; }
}

/* Shared narrow-screen safeguards */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  overflow-wrap: break-word;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 720px) {
  .flash-message {
    width: calc(100% - 24px);
    box-sizing: border-box;
  }

  .environment-badge {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 6px 8px;
    font-size: 10px;
  }

  .admin-schedule-header,
  .upcoming-heading,
  .report-page-header,
  .users-panel-header,
  .appointment-filters,
  .appointment-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .in-progress-card-actions .dashboard-appointment-actions {
    width: auto;
    margin: 0 auto 0 0;
  }

  .dashboard-appointment-action {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .admin-schedule-header h1,
  .users-header h1 {
    font-size: 27px;
  }

  .week-range,
  .upcoming-datetime {
    flex-wrap: wrap;
    text-align: left;
  }

  .week-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .week-navigation .week-range {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid #d8dadd;
    border-radius: 6px;
    background: #f7f8f9;
  }

  .week-navigation .week-nav-link:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .week-navigation .week-nav-link:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
  }

  .week-navigation .week-current-link {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .week-nav-link,
  .week-current-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    text-align: center;
  }

  .calendar-scroll,
  .attendance-report-table-wrapper {
    margin-right: -12px;
    margin-left: -12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .week-calendar { min-width: 760px; }

  .calendar-mobile-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 10px;
    color: #686c72;
    font-size: 12px;
    font-weight: 650;
  }

  .calendar-mobile-hint span {
    color: #202124;
    font-size: 18px;
    line-height: 1;
  }

  .admin-calendar-shell {
    scroll-snap-type: x proximity;
    scroll-padding-left: 58px;
  }

  .admin-calendar {
    width: calc(500vw - 352px);
    min-width: calc(500vw - 352px);
    table-layout: fixed;
  }

  .admin-calendar .time-column {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 58px;
    min-width: 58px;
    padding-right: 4px;
    padding-left: 4px;
    box-sizing: border-box;
    background: #fafafa;
    box-shadow: 1px 0 0 #d8dadd;
  }

  .admin-calendar thead .time-column {
    z-index: 5;
  }

  .admin-calendar thead th:not(.time-column),
  .admin-calendar .calendar-slot {
    width: calc(100vw - 82px);
  }

  .admin-calendar thead th:not(.time-column) {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  .admin-calendar .calendar-slot {
    height: 88px;
    padding: 8px;
  }

  .admin-calendar .calendar-event {
    min-height: 70px;
    padding: 10px 12px;
  }

  .admin-calendar .event-heading,
  .admin-calendar .event-meta {
    gap: 10px;
  }

  .admin-calendar .event-icon-actions {
    flex-shrink: 0;
  }

  .admin-calendar .event-button {
    width: 36px;
    height: 36px;
  }

  .report-filter-actions,
  .header-actions,
  .patient-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .report-filter-actions > *,
  .header-actions > *,
  .patient-form-actions > *,
  .management-search > *,
  .appointment-edit-actions > * {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .management-search {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  .management-edit-dialog,
  .absence-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
  }

  .management-modal-content,
  .absence-dialog header,
  .absence-dialog footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .appointment-edit-grid {
    grid-template-columns: 1fr;
  }

  .appointment-filter-field,
  .appointment-status-filter-field {
    width: 100%;
  }

  .appointment-status-filter-field {
    flex: 0 1 auto;
  }

  .appointment-filters {
    margin-bottom: 18px;
  }

  .appointment-status-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .appointment-status-filter.is-all {
    grid-column: 1 / -1;
  }

  .appointment-status-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 7px;
    text-align: center;
    white-space: normal;
  }

  .patient-radio-options label {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .app-brand {
    min-height: 38px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 25px;
  }

  .schedule-page,
  .selection-page,
  .appointment-form-page,
  .daily-dashboard,
  .report-page {
    width: calc(100% - 20px);
    margin-top: 22px;
  }

  .training-report-filter-grid,
  .behavioral-training-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-score-summary,
  .my-assessment-scores {
    display: grid;
    grid-template-columns: 1fr;
  }

  .exercise-selection-form,
  .appointment-form,
  .report-filter-panel {
    padding: 14px;
  }

  .users-table td {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    text-align: left;
  }

  .users-actions { white-space: normal; }
}

.form-actions-bottom { align-self: flex-end; }
.assessment-list-date { margin: 5px 0; }
.assessment-list-footer { margin-top: 25px; text-align: center; }
.assessment-result-actions { margin-top: 20px; text-align: center; }
.assessment-run-actions { margin-top: 30px; text-align: center; }
.inline-form { display: inline; }
