.badge.soon {
  background: #fff1df !important;
  color: #d87811 !important;
}
.badge.healthy {
  background: #e5f7ef !important;
  color: #159a67 !important;
}
.sms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.sms-card {
  padding: 24px;
}
.sms-state {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.sms-state.ready {
  background: #dcfce7;
  color: #166534;
}
.sms-state.missing {
  background: #fee2e2;
  color: #991b1b;
}
.sms-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.sms-info div {
  background: #f7f9fc;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  padding: 13px;
}
.sms-info span {
  display: block;
  color: #728096;
  font-size: 11px;
  margin-bottom: 5px;
}
.sms-note,
.sms-settings small {
  display: block;
  color: #728096;
  line-height: 1.6;
}
.sms-card form {
  display: grid;
  gap: 12px;
}
.sms-card label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.sms-card input,
.sms-card textarea {
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  padding: 11px;
  font: inherit;
}
.sms-settings {
  grid-column: 1/-1;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  padding: 20px;
  margin-top: 2px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}
.sms-settings h3 {
  margin: 0 0 12px;
}
.sms-settings .check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sms-settings .check input {
  width: auto;
}
.sms-template-label {
  display: grid;
  gap: 7px;
  margin: 14px 0 9px;
  font-weight: 700;
}
.sms-template-label textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  line-height: 1.5;
}
.sms-settings code {
  background: #eef3f9;
  border-radius: 5px;
  padding: 2px 5px;
}
.settings-panel {
  overflow: hidden;
}
.settings-panel > .panelhead {
  padding: 24px 26px;
  background: linear-gradient(135deg, #f8fbff 0%, #fff 65%);
}
.settingsform.settings-dashboard {
  max-width: none;
  padding: 24px 26px 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: #f8fafc;
}
.settings-dashboard > label {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  background: #fff;
}
.settings-dashboard > label input,
.settings-dashboard > label textarea,
.settings-dashboard > label select {
  box-sizing: border-box;
  width: 100%;
  margin-top: 2px;
}
.settings-dashboard > .payment-settings,
.settings-dashboard > .sms-settings {
  grid-column: 1 / -1;
}
.settings-dashboard > button.primary {
  grid-column: 1 / -1;
  order: 100;
  justify-self: end;
  min-width: 220px;
  padding: 12px 18px;
}
.settings-dashboard .payment-settings {
  margin: 0;
  background: linear-gradient(180deg, #fffdf9 0%, #fff9f1 100%);
}
.settings-dashboard .sms-template-label {
  padding: 0;
  border: 0;
  background: transparent;
}
.settings-dashboard .sms-template-label textarea {
  box-sizing: border-box;
  max-width: 100%;
}
.detail-action-buttons [data-send-portal-sms] {
  color: #173e68 !important;
  border-color: #bfcfe2 !important;
  background: #f3f7fc !important;
}
.detail-action-buttons [data-send-portal-sms]:disabled {
  opacity: 0.65;
  cursor: wait;
}
@media (max-width: 760px) {
  .settingsform.settings-dashboard {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .settings-dashboard > label,
  .settings-dashboard > .payment-settings,
  .settings-dashboard > .sms-settings,
  .settings-dashboard > button.primary {
    grid-column: 1;
  }
  .settings-dashboard > button.primary {
    width: 100%;
    min-width: 0;
  }
}
.sms-logs {
  overflow: hidden;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px 4px;
}
.pager button,
.calendar-nav button {
  border: 1px solid #d8e1ec;
  background: #fff;
  color: #173e68;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pager span {
  min-width: 70px;
  text-align: center;
  color: #65738a;
  font-size: 13px;
  font-weight: 700;
}
.calendar-head {
  align-items: center;
  gap: 16px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-nav strong {
  min-width: 150px;
  text-align: center;
  text-transform: capitalize;
}
.month-weekdays,
.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.month-weekdays {
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f7f9fc;
}
.month-weekdays span {
  padding: 10px;
  text-align: center;
  color: #66758a;
  font-size: 12px;
  font-weight: 800;
}
.month-calendar {
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
}
.month-day {
  min-height: 118px;
  padding: 8px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}
.month-day.outside {
  background: #f8fafc;
  color: #aab4c2;
}
.month-day.today {
  box-shadow: inset 0 0 0 2px #2563eb;
}
.day-number {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}
.month-day.today .day-number {
  background: #2563eb;
  color: #fff;
}
.day-events {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}
.month-event {
  min-width: 0;
  padding: 5px 6px;
  border-radius: 6px;
  border-left: 3px solid;
  font-size: 10px;
  line-height: 1.25;
}
.month-event.start {
  background: #eaf2ff;
  border-color: #2563eb;
  color: #194c9a;
}
.month-event.end {
  background: #fff1e5;
  border-color: #f47b20;
  color: #9a4818;
}
.month-event strong,
.month-event small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-legend {
  display: flex;
  gap: 18px;
  padding-top: 14px;
  color: #66758a;
  font-size: 12px;
}
.calendar-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}
.calendar-legend i.start {
  background: #2563eb;
}
.calendar-legend i.end {
  background: #f47b20;
}
@media (max-width: 850px) {
  .sms-grid {
    grid-template-columns: 1fr;
  }
  .sms-info {
    grid-template-columns: 1fr;
  }
  .calendar-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .calendar-nav {
    width: 100%;
  }
  .calendar-nav strong {
    flex: 1;
  }
  .month-day {
    min-height: 82px;
    padding: 4px;
  }
  .month-event {
    padding: 3px;
  }
  .month-event small {
    display: none;
  }
}
