.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border: 1px solid #dfebf3;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.patients-panel {
  min-width: 0;
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.count-pill {
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--sky);
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
}

.patient-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  margin-top: 20px;
}

.search-field {
  position: relative;
}

.search-field > span:first-child {
  position: absolute;
  top: 9px;
  left: 13px;
  color: #7a93a7;
  font-size: 20px;
}

.search-field input,
.filter-field select,
.appointment-modal input,
.appointment-modal select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9fbfd;
  color: var(--ink);
}

.search-field input {
  width: 100%;
  padding: 0 14px 0 40px;
}

.filter-field select {
  padding: 0 32px 0 12px;
}

.search-field input::placeholder {
  color: #9aadbd;
}

.patient-list-head,
.patient-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(130px, 1.1fr) minmax(120px, 1fr) 100px 84px 28px;
  align-items: center;
  gap: 12px;
}

.patient-list-head {
  margin-top: 18px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  color: #94a7b6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.patient-row {
  width: 100%;
  min-height: 66px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  background: white;
  color: inherit;
  text-align: left;
  transition: background 160ms ease;
}

.patient-row:hover {
  background: #f6fbff;
}

.patient-row:last-child {
  border-bottom: 0;
}

.patient-name {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.patient-name .avatar {
  width: 36px;
  height: 36px;
  font-size: 10px;
}

.patient-name span:last-child,
.treatment-cell,
.centre-cell {
  min-width: 0;
}

.patient-name strong,
.patient-name small,
.treatment-cell strong,
.treatment-cell small,
.centre-cell strong,
.centre-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-name strong,
.treatment-cell strong,
.centre-cell strong {
  color: var(--ink);
  font-size: 11px;
}

.patient-name small,
.treatment-cell small,
.centre-cell small {
  margin-top: 2px;
  color: #8da1b2;
  font-size: 9px;
}

.progress-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7eef4;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #4fbbf4);
}

.progress-cell b {
  color: #52718c;
  font-size: 9px;
}

.plan-badge {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 99px;
  background: #eef3f6;
  color: #698092;
  font-size: 9px;
  font-weight: 800;
}

.plan-badge.advanced {
  background: #fff1d6;
  color: #a16810;
}

.row-arrow {
  color: #93a5b5;
  font-size: 16px;
}

.empty-state {
  margin: 20px 0 0;
  padding: 28px;
  border-radius: 14px;
  background: #f4f9fd;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.right-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.calendar-panel,
.centre-panel {
  padding: 22px;
}

.panel-heading.compact h2 {
  font-size: 17px;
}

.text-button {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--sky);
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.day-button {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.day-button b {
  color: var(--ink);
  font-size: 12px;
}

.day-button.selected,
.day-button:hover {
  background: var(--blue);
  color: white;
}

.day-button.selected b,
.day-button:hover b {
  color: white;
}

.appointment-list {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 45px 4px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.appointment-time {
  color: #668095;
  font-size: 9px;
  text-align: right;
}

.appointment-line {
  align-self: stretch;
  border-radius: 99px;
  background: var(--blue);
}

.appointment-line.green {
  background: #21a57f;
}

.appointment-copy {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 11px;
  background: #f4f9fd;
}

.appointment-copy strong,
.appointment-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-copy strong {
  font-size: 10px;
}

.appointment-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.no-visits {
  margin: 5px 0;
  padding: 18px;
  border-radius: 12px;
  background: #f4f9fd;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.centre-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid #edf2f6;
}

.centre-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.centre-mark {
  width: 11px;
  height: 38px;
  border-radius: 99px;
}

.centre-mark.blue {
  background: linear-gradient(var(--blue), #54adff);
}

.centre-mark.aqua {
  background: linear-gradient(#14a68d, #78dac6);
}

.centre-row strong,
.centre-row small {
  display: block;
}

.centre-row strong {
  font-size: 10px;
}

.centre-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.centre-row b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--sky);
  color: var(--blue);
  font-size: 11px;
}

.demo-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 15px 4px 0;
  border-top: 1px solid var(--line);
  color: #7d92a4;
  font-size: 10px;
}

.demo-footer p {
  margin: 0;
}

.demo-footer strong {
  color: var(--ink);
}
