/* Home — compact Esteja appointment actions modal. */
#modal:has(.home-appointment-actions){
  width:min(610px,calc(100% - 32px));
  padding:0;
  border:1px solid #e4e8ef;
  border-radius:24px;
  background:#fff;
  box-shadow:0 24px 70px rgba(26,31,44,.18);
}
#modal:has(.home-appointment-actions) #modalbody{
  padding:34px 36px 32px;
}
#modal:has(.home-appointment-actions) .modalhead{
  margin-bottom:22px;
}
#modal:has(.home-appointment-actions) .modalhead h2{
  margin:0;
  color:#171826;
  font-family:var(--font-heading);
  font-size:28px;
  font-weight:650;
  letter-spacing:-.6px;
}
#modal:has(.home-appointment-actions) .close{
  width:44px;
  height:44px;
  border:1px solid #e2e6ed;
  border-radius:50%;
  background:#fff;
  color:#222735;
  box-shadow:none;
  outline:none;
}
#modal:has(.home-appointment-actions) .close:hover{
  border-color:#d9dde5;
  background:#f6f7f9;
  color:#222735;
}
#modal:has(.home-appointment-actions) .close:focus-visible{
  outline:3px solid rgba(124,87,255,.15);
  outline-offset:2px;
}
.home-appointment-actions .appointment-actions-summary{
  display:grid;
  gap:6px;
  margin-bottom:22px;
  padding:16px 17px;
  border:1px solid #e8ebf1;
  border-radius:16px;
  background:#fafbfe;
}
.home-appointment-actions .appointment-actions-summary strong{
  color:#171826;
  font-size:18px;
  font-weight:650;
  line-height:1.25;
}
.home-appointment-actions .appointment-actions-summary span{
  color:#6f7889;
  font-size:14px;
  line-height:1.45;
}
.home-appointment-actions .appointment-actions-list{
  display:grid;
  gap:10px;
}
.home-appointment-actions .appointment-action{
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  min-height:52px;
  padding:12px 15px;
  border:1px solid #e2e6ed;
  border-radius:13px;
  background:#fff;
  color:#222735;
  font-family:var(--font-ui);
  font-size:15px;
  font-weight:600;
  text-align:left;
  box-shadow:none;
}
.home-appointment-actions .appointment-action svg{
  flex:0 0 20px;
  width:20px;
  height:20px;
}
/* Neutral actions stay neutral on hover,so lilac keeps meaning “primary action”. */
.home-appointment-actions .appointment-action:not(.appointment-action-primary):not(.appointment-action-danger):hover{
  border-color:#d8dde6;
  background:#f6f7f9;
  color:#222735;
}
.home-appointment-actions .appointment-action-primary{
  border-color:#d9d0ff;
  background:#f5f1ff;
  color:#6849eb;
}
.home-appointment-actions .appointment-action-primary:hover{
  border-color:#c8b9ff;
  background:#ece5ff;
  color:#5f41df;
}
.home-appointment-actions .appointment-action-danger{
  margin-top:2px;
  border-color:#f0d7dc;
  background:#fff7f8;
  color:#b34b5b;
}
.home-appointment-actions .appointment-action-danger:hover{
  border-color:#e9c7cf;
  background:#fff1f3;
  color:#a93d4f;
}

/* Replacement candidate */
.replacement-offer{
  display:grid;
  gap:14px;
}
.replacement-slot{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  border:1px solid #e8ebf1;
  border-radius:14px;
  background:#fafbfe;
  color:#606d82;
}
.replacement-slot svg{flex:0 0 18px;color:var(--violet)}
.replacement-slot div{display:grid;gap:2px}
.replacement-slot strong{color:#1d2230;font-size:14px;font-weight:650}
.replacement-slot span{font-size:13px}
.replacement-candidate{
  display:flex;
  align-items:center;
  gap:13px;
  padding:15px 16px;
  border:1px solid #ded7ff;
  border-radius:16px;
  background:#f8f5ff;
}
.replacement-avatar{
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  border-radius:13px;
  background:#ece6ff;
  color:#6849eb;
  font-size:14px;
  font-weight:700;
}
.replacement-candidate-main{display:grid;gap:4px;min-width:0;flex:1}
.replacement-candidate-main>span{color:#6f7889;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.replacement-name-row{display:flex;align-items:center;gap:8px;min-width:0}
.replacement-name-row strong{color:#171826;font-size:17px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.replacement-priority{
  flex:0 0 auto;
  padding:4px 8px;
  border:1px solid #e3e6ec;
  border-radius:999px;
  background:#fff;
  color:#768195;
  font-size:11px;
  font-weight:650;
}
.replacement-priority.is-high{border-color:#ead8a3;background:#fff9e9;color:#9a7620}
.replacement-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.replacement-meta>div{
  display:grid;
  gap:4px;
  padding:11px 12px;
  border:1px solid #e8ebf1;
  border-radius:12px;
  background:#fff;
}
.replacement-meta small{color:#8993a4;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.35px}
.replacement-meta strong{color:#374258;font-size:13px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.replacement-message{display:grid;gap:8px;color:#38445a;font-size:13px;font-weight:650}
.replacement-message textarea{
  min-height:96px;
  resize:vertical;
  padding:12px 13px;
  border:1px solid #e1e5ec;
  border-radius:12px;
  background:#fff;
  color:#374258;
  font:500 13.5px/1.5 var(--font-ui);
  box-shadow:none;
}
.replacement-message textarea:focus{outline:none;border-color:#c9bdff;box-shadow:0 0 0 3px rgba(124,87,255,.09)}
.replacement-copy{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:9px 13px;
  border:1px solid #e0e4eb;
  border-radius:11px;
  background:#fff;
  color:#4e5a70;
  font:600 13px var(--font-ui);
}
.replacement-copy:hover{border-color:#d8dde6;background:#f6f7f9;color:#38445a}
.replacement-copy svg{width:17px;height:17px}
.replacement-status{
  margin:0;
  padding:11px 12px;
  border-radius:11px;
  background:#f7f8fb;
  color:#7b8495;
  font-size:12.5px;
  line-height:1.45;
}
.replacement-actions{
  display:grid;
  grid-template-columns:1fr 1.35fr;
  gap:10px;
  margin-top:2px;
}
.replacement-actions .appointment-action{justify-content:center;min-height:46px;font-size:13px;text-align:center}
.replacement-actions .appointment-action-danger{margin-top:0}
.replacement-empty-copy{margin:0;color:#6f7889;font-size:14px;line-height:1.5}
@media(max-width:640px){
  #modal:has(.home-appointment-actions) #modalbody{padding:26px 22px 24px}
  #modal:has(.home-appointment-actions) .modalhead h2{font-size:24px}
  .home-appointment-actions .appointment-action{min-height:50px}
  .replacement-meta{grid-template-columns:1fr}
  .replacement-actions{grid-template-columns:1fr}
  .replacement-name-row{align-items:flex-start;flex-direction:column}
}
