.user-portal {
  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(164, 211, 229, 0.34),
      transparent 30%
    ),
    radial-gradient(
      circle at 15% 72%,
      rgba(182, 226, 205, 0.3),
      transparent 28%
    ),
    linear-gradient(145deg, #f8fbfa 0%, #edf5f3 52%, #eef5f8 100%);
  background-attachment: fixed;
  color: #183d33;
}
.user-portal .page-content {
  position: relative;
  isolation: isolate;
}
.user-portal .page-content::before,
.user-portal .page-content::after {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(7, 150, 105, 0.08);
  border-radius: 50%;
  content: "";
}
.user-portal .page-content::before {
  right: 4vw;
  bottom: 5vh;
  width: 280px;
  height: 280px;
}
.user-portal .page-content::after {
  right: 10vw;
  bottom: 12vh;
  width: 120px;
  height: 120px;
}
.user-portal .page-content {
  padding: 32px 36px 55px;
}
.user-portal .page-heading {
  border: 1px solid #dce9e3;
  border-left: 4px solid #079669;
  background: rgba(255, 255, 255, 0.9);
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d8e6e0;
  border-radius: 14px;
  background: #fff;
  color: #174c3e;
  box-shadow: 0 8px 22px rgba(7, 91, 71, 0.06);
}
.notification-button:hover {
  background: #ebf7f2;
  color: #087759;
}
.notification-button span {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 99px;
  background: #e34c4c;
  color: #fff;
  font-size: 0.67rem;
  font-weight: 800;
}
.topbar-avatar {
  overflow: hidden;
  text-decoration: none;
}
.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.dashboard-header h1 {
  margin: 2px 0 4px;
  font-size: clamp(2rem, 4vw, 3rem);
}
.dashboard-header p {
  margin: 0;
  color: #71857d;
}
.consultation-list {
  display: grid;
  gap: 18px;
}
.consultation-list-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: visible;
  border: 1px solid rgba(193, 218, 208, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(26, 80, 67, 0.08);
}
.consultation-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 150px;
  padding: 22px 14px;
  border-radius: 23px 0 0 23px;
  background: linear-gradient(150deg, #075b47, #0b8a67);
  color: #fff;
}
.consultation-date strong {
  font:
    700 2.25rem "Playfair Display",
    serif;
}
.consultation-date span,
.consultation-date small {
  color: #d8f1e8;
}
.consultation-info {
  padding: 24px 28px;
}
.consultation-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.consultation-title-row h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}
.consultation-title-row p,
.return-note,
.reschedule-note,
.cancel-note {
  margin: 0;
  color: #667e76;
}
.return-note,
.reschedule-note,
.cancel-note {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eef7f3;
  font-size: 0.9rem;
}
.cancel-note {
  background: #fff3f1;
  color: #8a4137;
}
.consultation-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
}
.consultation-action {
  position: relative;
}
.consultation-action summary {
  padding: 7px 12px;
  border: 1px solid #8bcbb5;
  border-radius: 9px;
  color: #086f55;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.consultation-action form {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(330px, 80vw);
  gap: 9px;
  padding: 16px;
  border: 1px solid #d4e5de;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 65, 52, 0.18);
}
.danger-action summary {
  border-color: #e9aaa3;
  color: #a23c31;
}
.rating-form {
  display: flex;
  gap: 8px;
}
.rating-done {
  color: #9a7419;
  font-weight: 700;
}
.return-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #d7e8e1;
  border-radius: 18px;
  background: #f3f9f6;
}
.return-field > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.return-field span {
  display: grid;
}
.return-field small {
  color: #6c827a;
}
.return-field input {
  max-width: 220px;
}
.patient-timeline {
  display: grid;
  gap: 14px;
}
.patient-timeline article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
}
.patient-timeline article > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #e5f5ee;
  color: #087559;
}
.patient-timeline article > div {
  padding-bottom: 15px;
  border-bottom: 1px solid #e1ebe7;
}
.patient-timeline time,
.patient-timeline strong {
  display: block;
}
.patient-timeline time {
  color: #71857d;
  font-size: 0.78rem;
}
.patient-timeline p {
  margin: 3px 0 0;
  color: #60776f;
}
.agenda-reschedule {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #c9e2d8;
  border-radius: 12px;
  background: #edf7f3;
}
.agenda-reschedule form {
  display: flex;
  gap: 7px;
  margin-top: 5px;
}
@media (max-width: 700px) {
  .consultation-list-item {
    grid-template-columns: 1fr;
  }
  .consultation-date {
    grid-template-columns: repeat(3, auto);
    justify-content: flex-start;
    align-items: baseline;
    gap: 8px;
    min-height: 0;
    border-radius: 23px 23px 0 0;
  }
  .consultation-date strong {
    font-size: 1.5rem;
  }
  .consultation-title-row,
  .return-field {
    align-items: flex-start;
    flex-direction: column;
  }
}
.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px;
  margin-bottom: 24px;
  border: 1px solid #d9e8e1;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 35px rgba(7, 91, 71, 0.06);
}
.welcome-date {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #42665b;
}
.welcome-date i {
  font-size: 1.7rem;
  color: #079669;
}
.welcome-date span {
  display: grid;
}
.welcome-date strong {
  text-transform: capitalize;
}
.patient-next {
  padding: 32px;
  border-radius: 25px;
  background: linear-gradient(130deg, #075b47, #0a8965);
  color: #eafff7;
  box-shadow: 0 22px 48px rgba(7, 91, 71, 0.2);
}
.patient-next h2 {
  color: #fff;
}
.patient-next .status-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.dashboard-stats {
  margin-top: 24px;
}
.dashboard-stat {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 22px;
  background: #fff;
  border: 1px solid #d9e8e1;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(7, 91, 71, 0.06);
}
.dashboard-stat i {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #e8f7f0;
  color: #079669;
  font-size: 1.35rem;
}
.dashboard-stat div {
  display: grid;
}
.dashboard-stat strong {
  font:
    700 1.8rem "Playfair Display",
    serif;
  color: #064638;
}
.dashboard-stat span {
  font-size: 0.82rem;
  color: #71857d;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin: 24px 0;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid #d9e8e1;
  border-radius: 18px;
  color: #244f43;
  box-shadow: 0 10px 28px rgba(7, 91, 71, 0.05);
  transition: 0.2s;
}
.quick-link:hover {
  transform: translateY(-3px);
  color: #075b47;
  border-color: #9ed5c0;
}
.quick-link i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: #e8f7f0;
  color: #079669;
  font-size: 1.15rem;
}
.quick-link span {
  display: grid;
}
.quick-link small {
  color: #71857d;
}
.portal-card {
  height: auto;
  background: #fff;
  border: 1px solid #d9e8e1;
  border-radius: 22px;
  box-shadow: 0 15px 38px rgba(7, 91, 71, 0.07);
  overflow: hidden;
}

.prescription-builder > .portal-card-header > i {
  color: #087454;
  font-size: 2rem;
}

.document-kind-selector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #ffffff, #f2faf6);
  border: 1px solid #d5e7df;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(6, 78, 59, 0.07);
}

.document-kind-selector > div {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.document-kind-selector strong,
.document-kind-selector small {
  display: block;
}

.document-kind-selector small {
  margin-top: 0.2rem;
  color: #6a8179;
}

.document-kind-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: #087454;
  background: #e7f6ef;
  border-radius: 14px;
  font-size: 1.35rem;
}

@media (max-width: 760px) {
  .document-kind-selector {
    grid-template-columns: 1fr;
  }
}

.prescription-item-form {
  padding: 1.15rem;
  background: #f6faf8;
  border: 1px solid #d8e8e1;
  border-radius: 16px;
}

.prescription-item-form + .prescription-item-form {
  margin-top: 1rem;
}

.prescription-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #075b47;
}
.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #e2ede8;
}
.portal-card-header h2 {
  font-size: 1.15rem;
  margin: 0;
}
.portal-card-header p {
  margin: 4px 0 0;
  color: #71857d;
  font-size: 0.84rem;
}
.portal-card-body {
  padding: 22px 24px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid #e5eee9;
  color: #244f43;
}
.recent-item:last-child {
  border: 0;
}
.recent-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: #e8f7f0;
  color: #079669;
}
.recent-item > div {
  display: grid;
  min-width: 0;
}
.recent-item small {
  color: #71857d;
}
.doctor-feature {
  background: linear-gradient(145deg, #073f33, #087357);
  color: #dff3eb;
}
.doctor-feature h2 {
  color: #fff;
}
.profile-settings {
  background: #fff;
  border: 1px solid #d9e8e1;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(7, 91, 71, 0.07);
  overflow: hidden;
}
.profile-main {
  padding: 32px;
}
.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 25px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e1ebe7;
}
.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #dff3ea, #a9dcc7);
  color: #087559;
  font:
    700 2.2rem "Playfair Display",
    serif;
  border: 5px solid #f3faf7;
  box-shadow: 0 8px 25px rgba(7, 91, 71, 0.15);
}
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.profile-photo-status {
  display: block;
  font-weight: 600;
}
.file-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px dashed #8fcab3;
  border-radius: 16px;
  background: #f2fbf7;
  cursor: pointer;
}
.file-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.file-picker strong {
  display: block;
}
.file-picker small {
  color: #71857d;
}
.file-picker i {
  font-size: 1.45rem;
  color: #079669;
}
.profile-section {
  padding-top: 27px;
}
.profile-section h2 {
  font-size: 1.18rem;
  margin-bottom: 17px;
}
.security-card {
  padding: 27px;
  background: #fff;
  border: 1px solid #d9e8e1;
  border-radius: 22px;
  box-shadow: 0 15px 38px rgba(7, 91, 71, 0.06);
}
.notification-list {
  display: grid;
  gap: 12px;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 19px;
  border: 1px solid #d9e8e1;
  border-radius: 17px;
  background: #fff;
}
.notification-item.unread {
  border-left: 4px solid #079669;
  background: #f4fbf8;
}
.notification-item i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: #e8f7f0;
  color: #079669;
}
.notification-item p {
  margin: 4px 0;
  color: #58736b;
}
.notification-item small {
  color: #879990;
}
.status-pill {
  white-space: nowrap;
}
.status-pill.status-finalizada {
  background: #e4f4ed;
  color: #087052;
}
.status-pill.status-cancelada {
  background: #f3e8e8;
  color: #9a3d3d;
}
.status-pill.status-em-atendimento {
  background: #e2f2fb;
  color: #176a91;
}
.status-pill.status-aguardando-confirmacao {
  background: #fff2ce;
  color: #806000;
}
@media (max-width: 1100px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .user-portal .page-content {
    padding: 22px 16px 45px;
  }
  .dashboard-header,
  .welcome-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-photo-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar-actions {
    gap: 8px;
  }
  .topbar-user > div {
    display: none;
  }
}
@media (max-width: 480px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stat {
    padding: 17px;
  }
  .profile-main {
    padding: 22px;
  }
  .notification-button {
    width: 42px;
    height: 42px;
  }
}

.dashboard-stats > div:nth-child(2) .dashboard-stat i {
  background: #e8f1ff;
  color: #3269b3;
}
.dashboard-stats > div:nth-child(3) .dashboard-stat i {
  background: #fff2da;
  color: #a96b00;
}
.dashboard-stats > div:nth-child(4) .dashboard-stat i {
  background: #f3e9ff;
  color: #7450a8;
}
.agenda-week-card {
  padding: 25px;
  margin-bottom: 23px;
  border: 1px solid #d9e8e1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 15px 38px rgba(7, 91, 71, 0.07);
}
.agenda-week-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.agenda-week-heading > div {
  display: grid;
}
.agenda-week-heading strong {
  font:
    700 1.35rem "Playfair Display",
    serif;
  color: #064638;
}
.agenda-week-heading span {
  color: #71857d;
}
.agenda-date-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agenda-date-picker label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #526f66;
}
.agenda-date-picker .form-control {
  width: 165px;
}
.agenda-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.agenda-day {
  display: grid;
  place-items: center;
  padding: 13px 8px;
  border: 1px solid #dce9e3;
  border-radius: 15px;
  color: #42655b;
  background: #f8fbf9;
}
.agenda-day span,
.agenda-day small {
  font-size: 0.72rem;
}
.agenda-day strong {
  font-size: 1.35rem;
}
.agenda-day:hover,
.agenda-day.active {
  color: #fff;
  border-color: #079669;
  background: #079669;
  box-shadow: 0 10px 24px rgba(7, 150, 105, 0.2);
}
.agenda-filters {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  align-items: end;
  gap: 12px;
}
.agenda-filters label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #526f66;
}
.agenda-entry {
  display: grid;
  grid-template-columns: 74px 52px minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e3ece8;
}
.agenda-entry:last-child {
  border: 0;
}
.agenda-time,
.agenda-entry-content {
  display: grid;
}
.agenda-time strong {
  font-size: 1.15rem;
  color: #075b47;
}
.agenda-time span,
.agenda-entry-content span {
  font-size: 0.78rem;
  color: #71857d;
}
.blocked-period {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e3ece8;
}
.blocked-period > i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: #fff1e6;
  color: #b86620;
}
.blocked-period > div {
  display: grid;
}
.blocked-period span,
.blocked-period small {
  font-size: 0.78rem;
  color: #71857d;
}
.consultation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 25px 28px;
  border-radius: 25px;
  background: linear-gradient(130deg, #064c3d, #08785b);
  color: #e7fff6;
  box-shadow: 0 22px 48px rgba(7, 91, 71, 0.2);
}
.consultation-patient {
  display: flex;
  align-items: center;
  gap: 18px;
}
.consultation-patient > img,
.consultation-patient > span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 50%;
  object-fit: cover;
  background: #dff3ea;
  color: #087559;
  font-size: 1.8rem;
  font-weight: 800;
  border: 4px solid rgba(255, 255, 255, 0.25);
}
.consultation-patient small {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.consultation-patient h1 {
  margin: 2px 0;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}
.consultation-patient p {
  margin: 0;
  color: #cde8de;
}
.clinical-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin: 18px 0;
}
.clinical-summary-grid > div {
  display: grid;
  padding: 16px 18px;
  border: 1px solid #dce9e3;
  border-radius: 17px;
  background: #fff;
}
.clinical-summary-grid span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #71857d;
}
.clinical-summary-grid strong {
  margin-top: 4px;
  color: #244f43;
}
.consultation-tabs {
  display: flex;
  gap: 8px;
  padding: 9px;
  margin-bottom: 18px;
  overflow-x: auto;
  border: 1px solid #d9e8e1;
  border-radius: 18px;
  background: #fff;
}
.consultation-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #58736b;
  font-weight: 700;
  white-space: nowrap;
}
.consultation-tabs button:hover,
.consultation-tabs button.active {
  background: #08795b;
  color: #fff;
}
.consultation-panel {
  display: none;
}
.consultation-panel.active {
  display: block;
}
.consultation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid #e2ede8;
  background: #fbfdfc;
}
.soap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.soap-field {
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 12px;
  padding: 18px;
  border: 1px solid #dce9e3;
  border-radius: 18px;
  background: #fbfdfc;
}
.soap-field > span {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #079669;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}
.soap-field > small {
  color: #71857d;
}
.soap-field textarea {
  grid-column: 1/-1;
  margin-top: 13px;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 14px;
  font-size: 1.1rem;
}
.form-section-title small {
  font:
    500 0.75rem "DM Sans",
    sans-serif;
  color: #71857d;
}
.medication-box {
  padding: 20px;
  border: 1px solid #dce9e3;
  border-radius: 18px;
  background: #f8fbf9;
}
.medication-box h3 {
  font-size: 1.05rem;
}
.clinical-record {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid #e3ece8;
}
.clinical-record > i {
  font-size: 1.4rem;
  color: #079669;
}
.clinical-record > div {
  display: grid;
  flex: 1;
}
.clinical-record span {
  font-size: 0.82rem;
  color: #71857d;
}
.history-item {
  padding: 0;
  border: 1px solid #dce9e3;
  border-radius: 16px;
}
.history-item summary {
  display: flex;
  gap: 18px;
  padding: 17px 19px;
}
.history-item summary span {
  color: #08795b;
}
.history-soap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 19px 19px;
}
.history-soap > div {
  padding: 14px;
  border-radius: 12px;
  background: #f5faf7;
}
.history-soap p {
  margin: 5px 0 0;
  color: #58736b;
}
@media (max-width: 990px) {
  .agenda-entry {
    grid-template-columns: 64px 52px 1fr;
  }
  .agenda-entry .status-pill,
  .agenda-entry .btn {
    grid-column: 3;
  }
  .clinical-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .soap-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .agenda-week-heading,
  .consultation-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .agenda-days {
    grid-template-columns: repeat(4, 1fr);
  }
  .agenda-filters {
    grid-template-columns: 1fr;
  }
  .agenda-entry {
    grid-template-columns: 58px 1fr;
  }
  .agenda-entry .list-avatar {
    display: none;
  }
  .agenda-entry .status-pill,
  .agenda-entry .btn {
    grid-column: 2;
  }
  .clinical-summary-grid,
  .history-soap {
    grid-template-columns: 1fr;
  }
  .consultation-patient {
    align-items: flex-start;
  }
  .consultation-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .consultation-actions .btn {
    width: 100%;
  }
}
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }
  .medical-document {
    width: 180mm;
    min-height: 267mm;
    margin: 0 auto;
    padding: 12mm !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .medical-document header,
  .medical-document footer,
  .prescription-item {
    break-inside: avoid;
  }
}

.patient-portal {
  background-color: #f3f8f6;
  background-image:
    radial-gradient(
      circle at 90% 8%,
      rgba(111, 205, 166, 0.22),
      transparent 25%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(108, 159, 221, 0.12),
      transparent 28%
    ),
    linear-gradient(rgba(255, 255, 255, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    32px 32px,
    32px 32px;
}
.patient-portal .page-content {
  position: relative;
}
.patient-portal .page-content:before {
  content: "\f4d7";
  position: fixed;
  right: 4%;
  bottom: 4%;
  z-index: -1;
  font: 16rem/1 "bootstrap-icons";
  color: rgba(7, 150, 105, 0.035);
  transform: rotate(-10deg);
}
.patient-portal .portal-card,
.patient-portal .profile-settings,
.patient-portal .security-card,
.patient-portal .content-card {
  border-color: rgba(190, 216, 205, 0.86);
  box-shadow: 0 18px 45px rgba(26, 86, 69, 0.09);
}
.patient-portal .quick-link {
  position: relative;
  overflow: hidden;
  border-color: #d6e8e0;
  box-shadow: 0 14px 34px rgba(26, 86, 69, 0.08);
}
.patient-portal .quick-link:after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -25px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(7, 150, 105, 0.06);
}
.patient-portal .dashboard-stat {
  border: 0;
  box-shadow: 0 16px 36px rgba(26, 86, 69, 0.1);
}
.patient-portal .dashboard-stat strong {
  font-size: 2rem;
}
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) 310px;
  align-items: start;
  gap: 20px;
}
.booking-card {
  padding: 25px;
  border: 1px solid #d9e8e1;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 17px 42px rgba(7, 91, 71, 0.08);
}
.booking-step {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}
.booking-step > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: #079669;
  color: #fff;
  font-weight: 800;
}
.booking-step > div {
  display: grid;
}
.booking-step small {
  color: #71857d;
}
.patient-calendar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.patient-calendar-day {
  display: grid;
  place-items: center;
  min-height: 84px;
  padding: 9px;
  border: 1px solid #dce9e3;
  border-radius: 14px;
  background: #f8fbf9;
  color: #42655b;
}
.patient-calendar-day span,
.patient-calendar-day small {
  font-size: 0.7rem;
}
.patient-calendar-day strong {
  font-size: 1.35rem;
}
.patient-calendar-day:hover,
.patient-calendar-day.active {
  border-color: #079669;
  background: #079669;
  color: #fff;
  box-shadow: 0 9px 23px rgba(7, 150, 105, 0.2);
}
.booking-date-direct {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.booking-date-direct label {
  font-weight: 700;
  color: #526f66;
}
.time-period + .time-period {
  margin-top: 20px;
}
.time-period h2 {
  font:
    700 0.82rem "DM Sans",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #58736b;
}
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.time-option {
  display: grid;
  padding: 12px 8px;
  border: 1px solid #cfe3da;
  border-radius: 13px;
  background: #fff;
  color: #075b47;
  font-weight: 800;
}
.time-option small {
  font-size: 0.65rem;
  color: #71857d;
  font-weight: 500;
}
.time-option:hover:not(:disabled),
.time-option.active {
  border-color: #079669;
  background: #e6f7ef;
  box-shadow: 0 0 0 3px rgba(7, 150, 105, 0.1);
}
.time-option:disabled {
  background: #f2f3f3;
  color: #9aa6a2;
  cursor: not-allowed;
}
.time-option:disabled small {
  color: #a6afac;
}
.reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.reason-option input {
  position: absolute;
  opacity: 0;
}
.reason-option span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 11px;
  border: 1px solid #dce9e3;
  border-radius: 13px;
  color: #42655b;
  cursor: pointer;
}
.reason-option i {
  color: #079669;
}
.reason-option input:checked + span {
  border-color: #079669;
  background: #eaf8f2;
  color: #075b47;
  box-shadow: 0 0 0 3px rgba(7, 150, 105, 0.09);
}
.booking-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 0;
  padding: 15px;
  border-radius: 15px;
  background: #eef8f4;
  color: #42655b;
}
.booking-summary i {
  font-size: 1.5rem;
  color: #079669;
}
.booking-summary > div {
  display: grid;
}
.booking-summary span {
  font-size: 0.78rem;
}
.booking-aside {
  display: grid;
  gap: 16px;
}
.booking-aside .support-card {
  padding: 24px;
}
.booking-note {
  display: flex;
  gap: 12px;
  padding: 19px;
  border: 1px solid #d9e8e1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}
.booking-note i {
  color: #079669;
}
.booking-note p {
  margin: 0;
  color: #58736b;
  font-size: 0.86rem;
}
.archive-filter-card {
  padding: 21px;
  margin-bottom: 23px;
  border: 1px solid #d9e8e1;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 35px rgba(7, 91, 71, 0.07);
}
.archive-filter-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.archive-filter-heading > i {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: #e7f6ef;
  color: #079669;
}
.archive-filter-heading > div {
  display: grid;
}
.archive-filter-heading span {
  font-size: 0.8rem;
  color: #71857d;
}
.archive-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto auto;
  align-items: end;
  gap: 10px;
}
.archive-filter label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #58736b;
}
.archive-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #cfe1d9;
  border-radius: 12px;
  background: #fff;
}
.archive-search i {
  color: #079669;
}
.archive-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #183d33;
}
.archive-grid {
  display: grid;
  gap: 12px;
}
.archive-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #d9e8e1;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 11px 28px rgba(7, 91, 71, 0.06);
}
.archive-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 15px;
  background: #e8f7f0;
  color: #079669;
  font-size: 1.35rem;
}
.archive-icon.prescription {
  background: #eef0ff;
  color: #626ab4;
}
.archive-content {
  display: grid;
  flex: 1;
  min-width: 0;
}
.archive-content small {
  color: #71857d;
}
.archive-content h2 {
  margin: 2px 0;
  font-size: 1.08rem;
}
.archive-content p {
  margin: 2px 0 0;
  color: #71857d;
  font-size: 0.84rem;
}
.archive-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 13px;
  font-size: 1.2rem;
}
.archive-section-title i {
  color: #079669;
}
.archive-empty {
  grid-column: 1/-1;
  border: 1px dashed #bdd8cc;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
}
@media (max-width: 1250px) {
  .booking-layout {
    grid-template-columns: 1fr 1.35fr;
  }
  .booking-aside {
    grid-column: 1/-1;
    grid-template-columns: 1fr 1fr;
  }
  .archive-filter {
    grid-template-columns: 1fr 150px 150px auto;
  }
  .archive-filter .btn-light {
    grid-column: 4;
  }
}
@media (max-width: 850px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }
  .booking-aside {
    grid-column: auto;
  }
  .archive-filter {
    grid-template-columns: 1fr 1fr;
  }
  .archive-search {
    grid-column: 1/-1;
  }
  .archive-filter .btn-light {
    grid-column: auto;
  }
  .archive-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .archive-card .btn {
    margin-left: 66px;
  }
}
@media (max-width: 520px) {
  .patient-calendar {
    grid-template-columns: repeat(3, 1fr);
  }
  .time-grid,
  .reason-grid {
    grid-template-columns: 1fr 1fr;
  }
  .booking-aside {
    grid-template-columns: 1fr;
  }
  .archive-filter {
    grid-template-columns: 1fr;
  }
  .archive-search {
    grid-column: auto;
  }
  .archive-card .btn {
    width: 100%;
    margin-left: 0;
  }
}

.doctor-portal {
  background-color: #f2f7f6;
  background-image:
    radial-gradient(
      circle at 92% 5%,
      rgba(71, 154, 207, 0.16),
      transparent 27%
    ),
    radial-gradient(
      circle at 12% 88%,
      rgba(118, 82, 176, 0.1),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.56),
      rgba(229, 242, 237, 0.45)
    );
}
.doctor-portal .page-content {
  position: relative;
}
.doctor-portal .page-content:before {
  content: "\f491";
  position: fixed;
  right: 3%;
  bottom: 2%;
  z-index: -1;
  font: 17rem/1 "bootstrap-icons";
  color: rgba(6, 78, 59, 0.035);
  transform: rotate(-8deg);
}
.doctor-portal .portal-card,
.doctor-portal .profile-settings,
.doctor-portal .security-card {
  border-color: rgba(190, 216, 205, 0.88);
  box-shadow: 0 18px 46px rgba(25, 76, 65, 0.09);
}
.doctor-portal .quick-link {
  border: 0;
  box-shadow: 0 14px 34px rgba(25, 76, 65, 0.09);
}
.doctor-portal .quick-grid > a:nth-child(2) i {
  background: #e8f1ff;
  color: #3269b3;
}
.doctor-portal .quick-grid > a:nth-child(3) i {
  background: #fff1df;
  color: #b66c18;
}
.doctor-portal .quick-grid > a:nth-child(4) i {
  background: #f0e9ff;
  color: #7552aa;
}
.doctor-portal .quick-grid > a:nth-child(5) i {
  background: #ffe9ee;
  color: #b84864;
}
.account-create-panel {
  padding: 27px;
  margin-bottom: 24px;
  border: 1px solid #bcdccb;
  border-radius: 23px;
  background: linear-gradient(135deg, #fff, #eff9f5);
  box-shadow: 0 18px 45px rgba(7, 91, 71, 0.1);
}
.account-create-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.account-create-heading h2 {
  margin: 0 0 5px;
  font-size: 1.5rem;
}
.account-create-heading p {
  margin: 0;
  color: #71857d;
}
.account-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 16px;
  border: 1px solid #d4e5de;
  border-radius: 15px;
  background: #f8fbfa;
}
.account-search > i {
  color: #079669;
}
.account-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}
.account-list {
  display: grid;
}
.account-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 2px;
  border-bottom: 1px solid #e2ece8;
}
.account-row:last-child {
  border: 0;
}
.account-row > div:nth-child(2) {
  display: grid;
  flex: 1;
  min-width: 0;
}
.account-row span,
.account-row small {
  color: #71857d;
}
.account-role {
  display: flex !important;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto !important;
  padding: 8px 11px;
  border-radius: 12px;
  background: #eef7f3;
  color: #42655b !important;
  font-size: 0.78rem;
  font-weight: 700;
}
.account-role i {
  color: #079669;
}
.audit-timeline {
  display: grid;
  gap: 11px;
}
.audit-event {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  border: 1px solid #d9e8e1;
  border-left: 5px solid #079669;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(7, 91, 71, 0.055);
}
.audit-event-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border-radius: 14px;
  background: #e7f6ef;
  color: #079669;
}
.audit-event-content {
  display: grid;
  flex: 1;
}
.audit-event-content > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.audit-event-content time {
  color: #71857d;
  font-size: 0.77rem;
}
.audit-event-content p {
  margin: 3px 0 0;
  color: #71857d;
}
.audit-info {
  border-left-color: #3778bd;
}
.audit-info .audit-event-icon {
  background: #e8f2ff;
  color: #3778bd;
}
.audit-clinical {
  border-left-color: #7653aa;
}
.audit-clinical .audit-event-icon {
  background: #f0e9ff;
  color: #7653aa;
}
.audit-danger {
  border-left-color: #c24c57;
}
.audit-danger .audit-event-icon {
  background: #ffeaed;
  color: #c24c57;
}
.report-filter {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  margin-bottom: 22px;
  border: 1px solid #d9e8e1;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(7, 91, 71, 0.06);
}
.report-filter form {
  display: flex;
  align-items: end;
  gap: 11px;
}
.report-filter label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #58736b;
}
.report-filter span {
  color: #71857d;
  font-size: 0.82rem;
}
.report-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.report-kpi {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 16px 35px rgba(37, 72, 97, 0.14);
}
.report-kpi > i {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  flex: 0 0 51px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
}
.report-kpi > div {
  display: grid;
}
.report-kpi strong {
  font:
    700 1.9rem "Playfair Display",
    serif;
}
.report-kpi span {
  font-weight: 700;
}
.report-kpi small {
  opacity: 0.78;
}
.report-blue {
  background: linear-gradient(135deg, #326fae, #4b90ce);
}
.report-green {
  background: linear-gradient(135deg, #08785b, #11a478);
}
.report-purple {
  background: linear-gradient(135deg, #7050a4, #9474c4);
}
.report-orange {
  background: linear-gradient(135deg, #b56a18, #d99442);
}
.report-teal {
  background: linear-gradient(135deg, #147d86, #36a4aa);
}
.report-rose {
  background: linear-gradient(135deg, #a94360, #cb6b82);
}
.report-bars {
  display: grid;
  gap: 18px;
}
.report-bar > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}
.report-bar-track {
  height: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9f0ed;
}
.report-bar-track span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #079669, #55b896);
}
.month-chart {
  height: 240px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
}
.month-column {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 4px;
  min-width: 42px;
}
.month-column > div {
  height: 100%;
  width: 28px;
  display: flex;
  align-items: flex-end;
  border-radius: 9px;
  background: #edf3f0;
  overflow: hidden;
}
.month-column > div span {
  display: block;
  width: 100%;
  min-height: 7px;
  border-radius: 9px;
  background: linear-gradient(180deg, #53b993, #08785b);
}
.month-column small {
  color: #71857d;
}
@media (max-width: 1050px) {
  .report-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .account-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .account-row .account-identity {
    min-width: 55%;
  }
}
@media (max-width: 720px) {
  .account-create-heading,
  .report-filter {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-search,
  .report-filter form {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .account-search > i {
    display: none;
  }
  .account-search input {
    min-height: 44px;
  }
  .account-row .account-role,
  .account-row .status-pill {
    margin-left: 67px;
  }
  .audit-event {
    align-items: flex-start;
  }
  .audit-event-content > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .report-kpis {
    grid-template-columns: 1fr;
  }
  .report-filter form > div {
    width: 100%;
  }
  .report-filter .form-control {
    width: 100%;
  }
}
.blocked-period {
  grid-template-columns: auto 1fr auto;
}
.blocked-period form {
  align-self: center;
}
.patient-record-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  color: #fff;
  background: linear-gradient(125deg, #054e3a, #087454 68%, #629b3d);
  border-radius: 23px;
  box-shadow: 0 20px 48px rgba(6, 78, 59, 0.2);
}
.patient-record-hero > img,
.patient-record-avatar {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}
.patient-record-avatar {
  display: grid;
  place-items: center;
  background: #fff;
  color: #087454;
  font-size: 1.7rem;
  font-weight: 800;
}
.patient-record-hero > div:nth-child(2) {
  flex: 1;
}
.patient-record-hero h2 {
  margin: 0.15rem 0;
  color: #fff;
}
.patient-record-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}
.patient-record-hero dl {
  display: flex;
  gap: 1.2rem;
  margin: 0;
}
.patient-record-hero dl div {
  display: grid;
}
.patient-record-hero dt {
  font-size: 0.63rem;
  text-transform: uppercase;
  opacity: 0.7;
}
.patient-record-hero dd {
  margin: 0;
  font-weight: 700;
}
.patient-history-list {
  display: grid;
  gap: 0.75rem;
}
.patient-history-list details {
  padding: 1rem;
  border: 1px solid #dceae4;
  border-radius: 15px;
  background: #fbfdfc;
}
.patient-history-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}
.patient-history-list summary > span:first-child {
  display: grid;
}
.patient-history-list summary small {
  color: #71857d;
}
.patient-soap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
.patient-soap-grid article {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem;
  background: #f2f8f5;
  border-radius: 12px;
}
.patient-soap-grid article > b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: #fff;
  background: #087454;
  border-radius: 9px;
}
.patient-soap-grid p {
  margin: 0.2rem 0 0;
  color: #58736b;
  font-size: 0.8rem;
}
.clinical-notes {
  display: grid;
  gap: 1rem;
}
.clinical-notes > div {
  padding: 1rem;
  background: #f3f9f6;
  border-radius: 13px;
}
.clinical-notes p {
  margin: 0.35rem 0 0;
  color: #58736b;
}
@media (max-width: 800px) {
  .patient-record-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .patient-record-hero dl {
    flex-wrap: wrap;
  }
  .patient-soap-grid {
    grid-template-columns: 1fr;
  }
}
.account-photo {
  object-fit: cover;
}
.patient-record-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.patient-record-sidebar .portal-card {
  height: auto !important;
  margin-top: 0 !important;
}
.patient-record-sidebar .portal-card-body {
  flex: none;
}
.schedule-block-form {
  display: grid;
  gap: 1rem;
}
.schedule-date-field {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  background: linear-gradient(145deg, #f8fcfa, #eef8f4);
  border: 1px solid #d4e7df;
  border-radius: 15px;
}
.schedule-date-field > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #087454;
  background: #ddf3e9;
  border-radius: 12px;
  font-size: 1.1rem;
}
.schedule-date-field label,
.schedule-reason {
  display: grid;
  gap: 0.25rem;
}
.schedule-date-field strong,
.schedule-reason strong {
  color: #173f34;
  font-size: 0.85rem;
}
.schedule-date-field small,
.schedule-reason small {
  color: #71857d;
  font-size: 0.7rem;
}
.schedule-date-field input[type="datetime-local"] {
  min-height: 47px;
  margin-top: 0.35rem;
  color: #173f34;
  font-weight: 650;
  background: #fff;
  border: 1px solid #bcd9cc;
  border-radius: 11px;
  color-scheme: light;
}
.schedule-date-field
  input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  width: 21px;
  height: 21px;
  padding: 0.35rem;
  cursor: pointer;
  background-color: #dff4e9;
  border-radius: 8px;
  filter: sepia() saturate(4) hue-rotate(92deg) brightness(0.72);
}
.schedule-date-field input[type="datetime-local"]:focus {
  border-color: #079669;
  box-shadow: 0 0 0 0.22rem rgba(7, 150, 105, 0.13);
}
.schedule-reason {
  padding: 0.25rem 0.1rem;
}
.schedule-reason input {
  margin-top: 0.35rem;
  border-radius: 11px;
}
@media (max-width: 575px) {
  .schedule-date-field {
    grid-template-columns: 1fr;
  }
  .schedule-date-field > span {
    width: 40px;
    height: 40px;
  }
}

/* Navegação lateral dos portais */
.user-portal .sidebar {
  width: 275px;
  padding: 22px 15px;
  background: linear-gradient(180deg, #064e3b 0%, #043d31 58%, #032c25 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 38px rgba(3, 44, 37, 0.14);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.user-portal .sidebar:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 10% 2%,
      rgba(117, 220, 171, 0.22),
      transparent 15rem
    ),
    radial-gradient(
      circle at 110% 72%,
      rgba(115, 174, 61, 0.14),
      transparent 18rem
    );
}
.user-portal .portal-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 1px 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.1);
}
.user-portal .portal-brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 5px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}
.user-portal .portal-brand span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.14rem;
  line-height: 1.1;
}
.user-portal .portal-brand small {
  margin-top: 5px;
  color: #acd9ca;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
.user-portal .sidebar-nav {
  position: relative;
  display: grid;
  gap: 5px;
}
.user-portal .sidebar-link {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 5px 11px 5px 6px;
  color: #cae5dc;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition:
    color 0.18s,
    background 0.18s,
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
.user-portal .sidebar-link > i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #8de0c1;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  font-size: 1.04rem;
  transition:
    color 0.18s,
    background 0.18s,
    transform 0.18s;
}
.user-portal .sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.09);
  transform: translateX(3px);
}
.user-portal .sidebar-link:hover > i {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: scale(1.04);
}
.user-portal .sidebar-link.active {
  color: #064e3b;
  background: linear-gradient(135deg, #fff, #e8f7f0);
  border-color: #fff;
  box-shadow: 0 11px 25px rgba(0, 0, 0, 0.16);
}
.user-portal .sidebar-link.active:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 6px;
  height: 6px;
  background: #0a9569;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(10, 149, 105, 0.12);
  transform: translateY(-50%);
}
.user-portal .sidebar-link.active > i {
  color: #fff;
  background: linear-gradient(135deg, #08785b, #24ae7d);
  border-color: transparent;
  box-shadow: 0 7px 16px rgba(8, 120, 91, 0.25);
}
.user-portal .sidebar-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 8px 6px;
  padding: 0;
  color: #82bbae;
  font-size: 0.61rem;
  letter-spacing: 0.16em;
}
.user-portal .sidebar-label:before {
  content: "";
  width: 18px;
  height: 1px;
  background: #5c9f8d;
}
.patient-portal .sidebar {
  background: linear-gradient(180deg, #073f36 0%, #032f29 58%, #02241f 100%);
}
.patient-portal .sidebar:before {
  background:
    radial-gradient(circle at 8% 0, rgba(68, 190, 153, 0.2), transparent 15rem),
    radial-gradient(
      circle at 110% 78%,
      rgba(50, 112, 174, 0.13),
      transparent 18rem
    );
}
.patient-portal .sidebar-link.active > i {
  background: linear-gradient(135deg, #08765d, #3687a2);
}
.patient-portal .sidebar-nav > .sidebar-link > i {
  color: #8de0c1;
  background: rgba(255, 255, 255, 0.075);
}
.patient-portal .sidebar-nav > .sidebar-link.active > i {
  color: #fff;
  background: linear-gradient(135deg, #08765d, #3687a2);
}
.patient-portal .sidebar-link.active {
  color: #064e3b;
  background: linear-gradient(135deg, #fff, #e8f7f0);
}
.patient-portal .sidebar-label {
  color: #87b6a7;
}
.doctor-portal .sidebar {
  background: linear-gradient(180deg, #073f36 0%, #032f29 58%, #02241f 100%);
}
.doctor-portal .sidebar:before {
  background:
    radial-gradient(circle at 8% 0, rgba(68, 190, 153, 0.2), transparent 15rem),
    radial-gradient(
      circle at 110% 78%,
      rgba(50, 112, 174, 0.13),
      transparent 18rem
    );
}
.doctor-portal .sidebar-link.active > i {
  background: linear-gradient(135deg, #08765d, #3687a2);
}
@media (max-width: 991px) {
  .user-portal .sidebar {
    width: 285px;
    left: -300px;
    padding-top: 18px;
  }
  .user-portal .sidebar.open {
    left: 0;
  }
  .user-portal .sidebar-link {
    min-height: 48px;
  }
  .user-portal .portal-brand {
    margin-bottom: 12px;
  }
}
.clinic-confirmation {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.18s,
    visibility 0.18s;
}
.clinic-confirmation.show {
  visibility: visible;
  opacity: 1;
}
.clinic-confirmation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 36, 30, 0.58);
  backdrop-filter: blur(4px);
}
.clinic-confirmation-dialog {
  position: relative;
  width: min(100%, 460px);
  padding: 1.8rem;
  background: #fff;
  border: 1px solid #d8e7e1;
  border-radius: 23px;
  box-shadow: 0 28px 80px rgba(2, 38, 31, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.18s;
}
.clinic-confirmation.show .clinic-confirmation-dialog {
  transform: none;
}
.clinic-confirmation-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #617a71;
  background: #f1f6f4;
  border: 0;
  border-radius: 11px;
}
.clinic-confirmation-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  color: #b33d45;
  background: #ffeaec;
  border-radius: 16px;
  font-size: 1.35rem;
}
.clinic-confirmation-dialog h2 {
  margin: 0 2.7rem 0.45rem 0;
  color: #123d31;
  font-size: 1.4rem;
}
.clinic-confirmation-dialog p {
  margin: 0;
  color: #657c74;
  line-height: 1.6;
}
.clinic-confirmation-dialog > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.clinic-confirmation-dialog .btn {
  min-width: 112px;
  border-radius: 12px;
}
.clinic-confirmation-dialog .btn-danger {
  background: #b33d45;
  border-color: #b33d45;
}
.clinic-confirmation-dialog .btn-danger:hover {
  background: #952f37;
  border-color: #952f37;
}
@media (max-width: 480px) {
  .clinic-confirmation-dialog {
    padding: 1.35rem;
  }
  .clinic-confirmation-dialog > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .clinic-confirmation-dialog .btn {
    min-width: 0;
  }
}
.availability-card {
  height: auto !important;
}
.availability-header {
  align-items: flex-end;
}
.availability-header > div {
  flex: 1;
}
.availability-header > label {
  display: grid;
  gap: 0.4rem;
  min-width: 210px;
  color: #49675d;
  font-size: 0.72rem;
  font-weight: 800;
}
.availability-header select {
  min-height: 47px;
  color: #0b5d46;
  font-weight: 750;
  border-color: #bcd9cd;
  border-radius: 12px;
}
.availability-editor {
  display: grid;
  gap: 0.7rem;
}
.availability-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1fr) minmax(
      280px,
      1fr
    );
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: linear-gradient(145deg, #fbfdfc, #f3f9f6);
  border: 1px solid #dceae4;
  border-radius: 15px;
}
.availability-day {
  cursor: pointer;
}
.availability-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.availability-day span {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 0.7rem;
  align-items: center;
}
.availability-day i {
  display: grid;
  grid-row: 1/3;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #087454;
  background: #e0f3ea;
  border-radius: 12px;
}
.availability-day strong,
.availability-day small {
  display: block;
}
.availability-day small {
  color: #71857d;
  font-size: 0.69rem;
}
.availability-day input:not(:checked) + span {
  opacity: 0.5;
}
.availability-day input:not(:checked) + span i {
  color: #7e8f89;
  background: #edf1ef;
}
.availability-period {
  display: grid;
  gap: 0.35rem;
}
.availability-period > small {
  color: #58736b;
  font-size: 0.7rem;
  font-weight: 800;
}
.availability-period > small i {
  color: #0a9569;
}
.availability-period > span {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
}
.availability-period input {
  width: 100%;
  min-height: 43px;
  padding: 0.45rem 0.6rem;
  color: #173f34;
  background: #fff;
  border: 1px solid #c5ddd3;
  border-radius: 10px;
  font-weight: 650;
  color-scheme: light;
}
.availability-period b {
  color: #81938c;
  font-size: 0.68rem;
}
.availability-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: #f8fbfa;
  border-top: 1px solid #e1ece7;
}
.availability-footer span {
  color: #647c73;
  font-size: 0.76rem;
}
.availability-footer i {
  color: #087454;
}
.availability-footer .btn {
  min-width: 180px;
}
@media (max-width: 1100px) {
  .availability-row {
    grid-template-columns: 1fr 1fr;
  }
  .availability-day {
    grid-column: 1/-1;
  }
  .availability-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .availability-header > label {
    width: 100%;
  }
}
@media (max-width: 680px) {
  .availability-row {
    grid-template-columns: 1fr;
  }
  .availability-day {
    grid-column: auto;
  }
  .availability-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .availability-footer .btn {
    width: 100%;
  }
}
.booking-doctor-picker {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #d6e9e2;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5fbf8, #eef8f5);
}

.booking-doctor-picker label {
  display: block;
  margin-bottom: 0.45rem;
  color: #315b51;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.booking-unavailable {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 16px;
  color: #76570b;
  background: #fff5d8;
}

.booking-unavailable i {
  font-size: 1.5rem;
}
.booking-unavailable span {
  display: block;
  color: #87744a;
}

.availability-row.disabled {
  opacity: 0.58;
  background: #f5f7f6;
}

.waiting-list {
  display: grid;
  gap: 0.8rem;
}
.waiting-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #deebe7;
  border-radius: 17px;
  background: #fbfdfc;
}
.waiting-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #087c5d;
  background: #e3f5ef;
  font-size: 1.2rem;
}
.waiting-item div > span,
.waiting-item div > small {
  display: block;
  color: #72857f;
}

@media (max-width: 680px) {
  .waiting-item {
    grid-template-columns: auto 1fr;
  }
  .waiting-item .status-pill,
  .waiting-item form {
    grid-column: 2;
    justify-self: start;
  }
}

/* Identidade visual uniforme do menu lateral. */
.patient-portal .sidebar-nav > .sidebar-link > i,
.doctor-portal .sidebar-nav > .sidebar-link > i {
  color: #9ce4c8;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.08);
}

.patient-portal .sidebar-nav > .sidebar-link:hover > i,
.doctor-portal .sidebar-nav > .sidebar-link:hover > i {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.patient-portal .sidebar-nav > .sidebar-link.active > i,
.doctor-portal .sidebar-nav > .sidebar-link.active > i {
  color: #fff;
  background: linear-gradient(135deg, #08785b, #24ae7d);
}

/* Situações da agenda continuam identificáveis mesmo sem depender somente da cor. */
.agenda-entry {
  border-left: 5px solid #9aaba6;
}

.agenda-entry.status-solicitada {
  border-left-color: #d59b18;
  background: #fffdf7;
}

.agenda-entry.status-aguardando-paciente {
  border-left-color: #9b6cc2;
  background: #fcf9ff;
}

.agenda-entry.status-confirmada {
  border-left-color: #2476a8;
  background: #f8fcff;
}


.agenda-entry.status-em-atendimento {
  border-left-color: #168d87;
  background: #f6fdfc;
}

.agenda-entry.status-finalizada {
  border-left-color: #2c8b58;
  background: #f8fdf9;
}

.agenda-entry.status-cancelada {
  border-left-color: #89938f;
  background: #fafafa;
}

.agenda-entry.status-nao-compareceu {
  border-left-color: #b84a4a;
  background: #fff9f9;
}

/* Organiza cada consulta da agenda como um cartão independente. */
.agenda-timeline {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.portal-card:has(.agenda-timeline) {
  overflow: visible;
}

.agenda-timeline .agenda-entry {
  box-sizing: border-box;
  grid-template-columns: 76px 52px minmax(0, 1fr) minmax(0, 260px) auto;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 96px;
  padding: 1rem 1.1rem;
  border: 1px solid #dce9e4;
  border-left-width: 5px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(7, 73, 57, 0.055);
}

.agenda-timeline .agenda-entry:last-child {
  border-bottom: 1px solid #dce9e4;
}

.agenda-timeline .agenda-time {
  align-content: center;
  padding-right: 0.85rem;
  border-right: 1px solid #dce9e4;
}

.agenda-timeline .agenda-time strong {
  font-size: 1.22rem;
  line-height: 1.1;
}

.agenda-timeline .agenda-time span {
  margin-top: 0.28rem;
}

.agenda-timeline .list-avatar {
  width: 48px;
  height: 48px;
  align-self: center;
}

.agenda-timeline .agenda-entry-content {
  align-content: center;
  min-width: 0;
}

.agenda-timeline .agenda-entry-content > strong {
  font-size: 1rem;
  line-height: 1.25;
  color: #153f35;
}

.agenda-timeline .agenda-entry-content > span {
  margin-top: 0.24rem;
  font-size: 0.82rem;
}

.agenda-entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.agenda-entry-actions form {
  margin: 0;
}

.agenda-entry-actions .btn {
  min-height: 42px;
  white-space: nowrap;
}

.agenda-current-status {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #d1e2dc;
  border-radius: 12px;
  color: #315d52;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
}

.agenda-cancel-action {
  position: relative;
}

.agenda-cancel-action > summary {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #e3b9b9;
  border-radius: 12px;
  color: #a33f3f;
  background: #fffafa;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.agenda-cancel-action > summary::-webkit-details-marker {
  display: none;
}

.agenda-cancel-action[open] > form {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.55rem);
  right: 0;
  width: 290px;
  padding: 1rem;
  border: 1px solid #e7cece;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(64, 35, 35, 0.16);
}

.agenda-cancel-action label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  color: #5e4a4a;
  font-size: 0.78rem;
  font-weight: 700;
}

.agenda-cancel-action textarea {
  resize: vertical;
}

.agenda-timeline .agenda-entry > .btn {
  min-height: 44px;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .agenda-timeline .agenda-entry {
    grid-template-columns: 70px 48px minmax(0, 1fr) minmax(190px, 230px);
  }

  .agenda-timeline .agenda-entry > .btn {
    grid-column: 4;
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 980px) {
  .agenda-timeline .agenda-entry {
    grid-template-columns: 70px 48px minmax(0, 1fr);
  }

  .agenda-timeline .agenda-entry-actions,
  .agenda-timeline .agenda-entry > .btn {
    grid-column: 3;
    width: 100%;
  }

  .agenda-timeline .agenda-entry-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .agenda-timeline .agenda-entry {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 0.8rem 0.9rem;
    padding: 0.95rem;
  }

  .agenda-timeline .agenda-time {
    grid-row: 1 / span 2;
    padding-right: 0.7rem;
  }

  .agenda-timeline .list-avatar {
    display: none;
  }

  .agenda-timeline .agenda-entry-content,
  .agenda-timeline .agenda-entry-actions,
  .agenda-timeline .agenda-entry > .btn {
    grid-column: 2;
    width: 100%;
  }

  .agenda-entry-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .agenda-cancel-action[open] > form {
    position: static;
    width: 100%;
    margin-top: 0.6rem;
  }
}

.pending-center,
.record-markers,
.pre-consultation-summary {
  margin-bottom: 1.5rem;
  padding: 1.3rem;
  border: 1px solid #d7e8e2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(10, 70, 54, 0.07);
}

.pre-consultation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.pre-consultation-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #dcebe6;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f6fbf9);
}

.pre-consultation-card > div {
  min-width: 0;
}

.pre-consultation-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  color: #087b5c;
  background: #e3f4ee;
  font-size: 1.2rem;
}

.pre-consultation-card small,
.pre-consultation-card strong,
.pre-consultation-card div > span {
  display: block;
}

.pre-consultation-card small {
  margin-bottom: 0.3rem;
  color: #70847e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pre-consultation-card strong {
  color: #164d40;
  font-size: 1.05rem;
  line-height: 1.35;
}

.pre-consultation-card div > span {
  margin-top: 0.35rem;
  color: #748780;
  font-size: 0.85rem;
  line-height: 1.4;
}

.consultation-evaluation .pre-consultation-icon {
  color: #356899;
  background: #e8f1fa;
}

.consultation-records .pre-consultation-icon {
  color: #8a6515;
  background: #fff3d9;
}

.pending-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.pending-heading h2,
.record-markers h2,
.pre-consultation-summary h2 {
  margin: 0;
  color: #164d40;
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.pending-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-height: 90px;
  padding: 1rem;
  border: 1px solid #dfebe7;
  border-radius: 17px;
  color: #345d53;
  background: #f8fbfa;
  text-decoration: none;
}

.pending-item i {
  color: #15936d;
  font-size: 1.35rem;
}

.pending-item strong,
.pending-item span {
  display: block;
}

.pending-item.has-items {
  border-color: #b9dfd1;
  background: #eff9f5;
}

.return-list,
.model-list,
.marker-list,
.communication-history {
  display: grid;
  gap: 0.85rem;
}

.record-markers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: end;
}

.record-markers-content {
  min-width: 0;
}

.record-markers-heading {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.record-markers-heading small {
  display: block;
  margin-top: 0.15rem;
  color: #748780;
}

.marker-heading-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #986913;
  background: #fff2d5;
  font-size: 1.15rem;
}

.marker-list {
  display: flex;
  flex-wrap: wrap;
}

.marker-list .clinical-marker {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  width: auto;
  padding: 0.6rem 0.65rem 0.6rem 0.75rem;
  border-color: #e4d5a8;
  border-radius: 14px;
  color: #5d4a1b;
  background: linear-gradient(145deg, #fffdf7, #fff7e4);
  box-shadow: 0 5px 14px rgba(104, 75, 16, 0.06);
}

.clinical-marker-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  color: #9b6c12;
  background: #ffebbd;
}

.clinical-marker strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.clinical-marker small {
  display: block;
  margin-top: 0.12rem;
  color: #897448;
  font-size: 0.72rem;
}

.clinical-marker form {
  margin-left: 0.15rem;
}

.clinical-marker-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8c6b31;
  background: rgba(145, 102, 22, 0.1);
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.clinical-marker-remove:hover,
.clinical-marker-remove:focus-visible {
  color: #fff;
  background: #b84949;
  transform: scale(1.08);
  outline: none;
}

.marker-empty {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: #71847e;
  font-size: 0.9rem;
}

.marker-empty i {
  color: #1c936c;
}

.marker-add-form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.marker-add-form .form-select {
  min-width: 235px;
}

.return-list article,
.model-list article,
.marker-list article,
.communication-history article {
  padding: 1rem;
  border: 1px solid #dceae5;
  border-radius: 16px;
  background: #fbfdfc;
}

.document-models summary {
  cursor: pointer;
  list-style: none;
}

.document-models summary::-webkit-details-marker {
  display: none;
}

.communication-form,
.document-model-form {
  display: grid;
  gap: 0.9rem;
}

.consultation-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.consultation-markers span,
.marker-list .status-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .pending-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .record-markers {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .marker-add-form .form-select {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .pending-grid {
    grid-template-columns: 1fr;
  }

  .pending-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .marker-add-form {
    align-items: stretch;
    flex-direction: column;
  }

  .marker-add-form .btn {
    width: 100%;
  }
}
