/* TIME ERP — Send SMS / WhatsApp (marketing_send_sms.html) */
a.sidebar__item { color: inherit; text-decoration: none; }

.crm-top-checkout {
  height: 32px; padding: 0 14px; border: none; border-radius: 4px;
  background: #25b7a7; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.crm-top-clock {
  font-size: 16px; font-weight: 600; color: #25B7A7;
  font-variant-numeric: tabular-nums; min-width: 46px; text-align: center;
}
.crm-top-icon { color: #25B7A7 !important; }
.crm-profile-caret { width: 14px; height: 14px; color: #94a3b8; flex-shrink: 0; }

.mss-page {
  min-height: 100%;
  margin: -16px calc(var(--content-pad-x, 16px) * -1) -24px;
  padding: 16px 24px 28px;
  background: #f3f5f7;
}

.mss-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mss-back {
  width: 28px; height: 28px; border-radius: 4px; background: #25B7A7; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0;
}
.mss-back svg { width: 16px; height: 16px; stroke: #fff; }
.mss-back:hover { background: #1fa396; }
.mss-title { margin: 0; font-size: 15px; font-weight: 600; color: #374151; }

.mss-panel {
  background: #fff; border: 1px solid #e8edf2; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: visible;
}

.mss-tabs {
  display: flex; align-items: stretch; gap: 0; padding: 0 16px;
  border-bottom: 1px solid #eef2f6; min-height: 46px;
}
.mss-tab {
  border: none; background: none; padding: 0 4px; margin-right: 24px;
  font-size: 14px; font-weight: 500; color: rgba(0, 0, 0, .45); cursor: pointer;
  position: relative; font-family: inherit; height: 46px;
}
.mss-tab.is-active { color: #25B7A7; }
.mss-tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: #25B7A7;
}

.mss-pane { padding: 22px 24px 28px; }
.mss-pane[hidden] { display: none !important; }

.mss-form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
  gap: 32px; align-items: start;
}
.mss-form__left { min-width: 0; }

.mss-row {
  display: grid; grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px; align-items: start; margin-bottom: 18px;
}
.mss-label {
  font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, .85);
  text-align: right; padding-top: 8px; line-height: 1.3;
}
.mss-req { color: #ff4d4f; margin-left: 2px; }

.mss-field-wrap { display: flex; flex-direction: column; gap: 6px; }
.mss-quick-link { font-size: 13px; color: #25B7A7; text-decoration: none; align-self: flex-start; }
.mss-quick-link:hover { text-decoration: underline; }

.mss-combo { position: relative; display: block; }
.mss-combo input {
  width: 100%; height: 36px; border: 1px solid #d9d9d9; border-radius: 4px;
  padding: 0 36px 0 12px; font-size: 14px; color: rgba(0, 0, 0, .85);
  background: #fff; font-family: inherit;
}
.mss-combo.is-open input,
.mss-combo input:focus {
  outline: none; border-color: #25B7A7; box-shadow: 0 0 0 2px rgba(37, 183, 167, .12);
}
.mss-combo__search {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #bfbfbf; pointer-events: none;
}
.mss-combo__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border-radius: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  z-index: 25; display: none; max-height: 240px; overflow: auto; padding: 4px 0;
}
.mss-combo.is-open .mss-combo__menu { display: block; }
.mss-combo__head {
  padding: 6px 12px 4px; font-size: 12px; font-weight: 600;
  color: rgba(0, 0, 0, .45); background: #fafafa;
}
.mss-combo__item {
  padding: 8px 12px; font-size: 14px; color: rgba(0, 0, 0, .85); cursor: pointer;
}
.mss-combo__item:hover,
.mss-combo__item.is-active { background: #f5f5f5; }

.mss-combo--filter { width: 200px; flex-shrink: 0; }

.mss-preview { min-height: 0; width: 100%; }
.mss-preview__box {
  width: 100%;
  min-height: 42px;
  border: 1px solid #000;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, .88);
  text-align: center;
  line-height: 1.4;
  white-space: pre-wrap;
  box-sizing: border-box;
  background: #fff;
}
.mss-preview__box.has-content {
  font-size: 14px;
  font-weight: 400;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  min-height: 120px;
}

.mss-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; padding-left: 146px;
}
.mss-action {
  height: 36px; padding: 0 18px; border-radius: 18px; font-size: 14px;
  font-weight: 500; cursor: pointer; font-family: inherit; border: 1px solid transparent;
}
.mss-action--sms { background: #25B7A7; border-color: #25B7A7; color: #fff; }
.mss-action--sms:hover { background: #1fa396; }
.mss-action--wa { background: #237804; border-color: #237804; color: #fff; }
.mss-action--wa:hover { background: #1d6603; }
.mss-action--ghost { background: #fff; border-color: #25B7A7; color: #25B7A7; }
.mss-action--ghost:hover { background: #e6fffb; }

/* View Sent SMS */
.mss-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.mss-filters__label { font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, .85); }

.mss-date-range { position: relative; }
.mss-date-range__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px;
  padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 6px;
  background: #fff; font-size: 14px; color: rgba(0, 0, 0, .45);
  cursor: pointer; font-family: inherit; min-width: 280px;
}
.mss-date-range__btn.is-filled { color: rgba(0, 0, 0, .85); }
.mss-date-range__btn.is-open {
  border-color: #91caff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
  color: rgba(0, 0, 0, .85);
}
.mss-date-range__btn.is-open .mss-date-range__part.is-active {
  box-shadow: inset 0 -2px 0 #1677ff;
}
.mss-date-range__part {
  padding: 2px 0;
  line-height: 1.2;
}
.mss-date-range__arrow { color: rgba(0, 0, 0, .25); }
.mss-date-range__icon { width: 16px; height: 16px; margin-left: auto; color: #bfbfbf; flex-shrink: 0; }

.mss-date-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: 552px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);
  padding: 12px 16px 14px;
}
.mss-date-pop[hidden] { display: none !important; }
.mss-date-pop__caret {
  position: absolute; top: -6px; left: 28px; width: 10px; height: 10px;
  background: #fff; transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, .04);
}

.mss-range-pop__header {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  margin-bottom: 6px;
  min-height: 32px;
}
.mss-range-pop__titles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, .88);
  pointer-events: none;
}
.mss-range-pop__nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.mss-range-pop__nav--left { justify-content: flex-start; }
.mss-range-pop__nav--right { justify-content: flex-end; }
.mss-range-pop__nav button {
  width: 24px; height: 24px; border: none; background: transparent;
  border-radius: 4px; cursor: pointer; color: rgba(0, 0, 0, .45);
  font-size: 12px; font-family: inherit; line-height: 1; padding: 0;
}
.mss-range-pop__nav button:hover { color: #1677ff; background: #f5f5f5; }
.mss-range-pop__cals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mss-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.mss-cal__dow {
  font-size: 14px;
  color: rgba(0, 0, 0, .65);
  padding: 6px 0;
  font-weight: 400;
}
.mss-cal__day {
  height: 28px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: rgba(0, 0, 0, .88);
  cursor: pointer;
  line-height: 26px;
  padding: 0;
}
.mss-cal__day.is-muted { color: rgba(0, 0, 0, .25); }
.mss-cal__day.is-selected {
  border-color: #1677ff;
  color: #1677ff;
  font-weight: 600;
  background: #fff;
}
.mss-cal__day.is-in-range { background: #e6f4ff; border-radius: 0; }
.mss-cal__day.is-range-start,
.mss-cal__day.is-range-end { background: #e6f4ff; }
.mss-cal__day:hover:not(.is-selected) { background: #f5f5f5; }

@media (max-width: 640px) {
  .mss-date-pop { width: min(360px, calc(100vw - 24px)); }
  .mss-range-pop__cals { grid-template-columns: 1fr; }
  .mss-range-pop__titles { grid-template-columns: 1fr; gap: 4px; }
}

.mss-table-wrap { overflow: auto; border: 1px solid #eef2f6; border-radius: 4px; }
.mss-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mss-table th {
  text-align: left; padding: 10px 14px; font-weight: 600;
  color: rgba(0, 0, 0, .85); background: #fafafa; border-bottom: 1px solid #eef2f6;
  white-space: nowrap;
}
.mss-table td {
  padding: 10px 14px; color: rgba(0, 0, 0, .78);
  border-bottom: 1px solid #eef2f6; vertical-align: middle;
}
.mss-table tbody tr:hover { background: #f7fbff; }
.mss-table tbody tr:last-child td { border-bottom: 0; }
.mss-view-link {
  border: none; background: none; padding: 0; color: #25B7A7;
  font-size: 14px; cursor: pointer; font-family: inherit; text-decoration: none;
}
.mss-view-link:hover { text-decoration: underline; }

/* Modal */
.mss-modal-scrim {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.mss-modal-scrim[hidden] { display: none !important; }
.mss-modal {
  width: min(520px, 100%); background: #fff; border-radius: 4px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .2); overflow: hidden;
}
.mss-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #eef2f6;
}
.mss-modal__head h2 { margin: 0; font-size: 16px; font-weight: 600; color: rgba(0, 0, 0, .88); }
.mss-modal__close {
  width: 28px; height: 28px; border: none; background: none;
  font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0;
}
.mss-modal__body {
  padding: 18px; font-size: 14px; line-height: 1.6; color: rgba(0, 0, 0, .78);
  max-height: 60vh; overflow: auto;
}

@media (max-width: 900px) {
  .mss-form { grid-template-columns: 1fr; }
  .mss-actions { padding-left: 0; }
  .mss-row { grid-template-columns: 1fr; gap: 6px; }
  .mss-label { text-align: left; padding-top: 0; }
}
