.settings-shell .main:has(> .em-page) {
  top: 57px;
  left: 158px;
}

.em-page {
  gap: 15px;
}

.em-page > .segmented {
  height: 38px;
}

.em-page > .segmented button {
  padding: 0 22px;
}

.em-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 18px;
  color: rgba(0, 0, 0, .88);
}

.em-card {
  position: relative;
  margin-bottom: 16px;
  padding: 20px 24px 16px;
  border-radius: 8px;
  background: #fff;
}

.em-card .ec-title {
  font-weight: 600;
}

.em-card .ec-title:before {
  width: 1px;
  margin-right: 13px;
}

.em-card .ec-description {
  margin: 12px 0 8px 14px;
}

.em-card .ec-panel {
  margin-left: 14px;
  background: #f3f4f5;
  border-radius: 6px;
}

.em-default-account .ec-title-row > .segmented {
  position: absolute;
  right: 24px;
  top: 16px;
}

.em-default-account .ec-title-row > .segmented > button {
  min-width: 76px;
}

.em-default-panel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 89px;
  padding-top: 20px;
}

.em-default-panel label {
  line-height: 32px;
  white-space: nowrap;
}

.em-default-panel .em-mailbox {
  width: min(360px, 72%);
}

.em-with-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.em-latest .ec-description {
  margin-top: 6px;
  margin-bottom: 0;
}

.em-latest .ec-switch {
  align-self: flex-end;
  margin-bottom: 5px;
}

.em-rules > .em-edit {
  top: 16px;
  right: 24px;
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  color: #262626;
}

.em-rule-card:hover .em-rules > .em-edit,
.em-rules > .em-edit:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.em-rules {
  padding: 16px 24px 14px;
}

.em-rule-grid {
  display: grid;
  grid-template-columns: minmax(130px, 360px) minmax(130px, 360px) 90px 32px;
  gap: 24px;
  align-items: start;
}

.em-rule-head {
  line-height: 20px;
  margin-bottom: 12px;
}

.em-rule-row + .em-rule-row {
  margin-top: 12px;
}

.em-rule-row > div {
  min-width: 0;
}

.em-rule-row > .ec-switch {
  margin-top: 8px;
}

.em-rule-row .em-mailbox {
  width: 100%;
}

.em-rule-row [aria-invalid="true"],
.em-seat-field[data-invalid="true"] {
  border-color: #ff4d4f;
}

.em-rules .ec-add {
  margin-top: 14px;
}

.em-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.em-page .em-actions .button {
  min-width: 58px;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
}

.em-seat-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 30px 3px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
}

.em-seat-field.readonly {
  background: #f5f5f5;
  color: #bfbfbf;
}

.em-seat-field:not(.readonly):hover,
.em-seat-field:has(.em-seat-trigger[aria-expanded="true"]) {
  border-color: #f60;
}

.em-seat-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
}

.em-seat-trigger:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.em-seat-trigger .icon {
  width: 13px;
  height: 13px;
  margin-left: auto;
  color: #bfbfbf;
}

.em-seat-tags {
  position: relative;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

.em-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 5px 1px 6px;
  border-radius: 4px;
  background: #f0f0f0;
  font-size: 12px;
  line-height: 20px;
}

.em-tag button {
  pointer-events: auto;
  border: 0;
  padding: 0 2px;
  line-height: 16px;
  background: transparent;
  color: #8c8c8c;
}

.em-tag button:disabled {
  color: #bfbfbf;
  pointer-events: none;
}

.em-picker .ec-menu-search:focus {
  outline: none;
  border-color: #ffbb90;
}

.em-picker-empty {
  padding: 12px 10px;
  color: #8c8c8c;
}

.em-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 8px 14px;
}

.em-contact-row .ec-number {
  width: min(360px, 80%);
}

.em-contact > .button {
  margin-left: 14px;
}

.em-mode .em-merge {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9e9e9;
}

.em-mode .ec-description {
  margin: 4px 0 0;
}

.em-page-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px;
}

.notification-drawer.em-notice-drawer .tabs {
  display: inline-flex;
  width: max-content;
  height: 32px;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  background: #f1f2f4;
}

.notification-drawer.em-notice-drawer .tabs button {
  flex-shrink: 0;
  height: 26px;
  line-height: 26px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  color: #747a84;
}

.notification-drawer.em-notice-drawer .tabs button.active {
  color: #f60;
  background: #fff;
  box-shadow: 0 1px 4px #102a4310;
}

.notification-drawer.em-notice-drawer .tabs button.active::after {
  display: none;
}

.em-notice-list {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  margin-top: 16px;
}

.em-notice-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  width: 100%;
  min-height: 86px;
  padding: 14px 23px 14px 25px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f5f5f6;
  text-align: left;
  gap: 8px;
}

.em-notice-card:hover,
.em-notice-card:focus-visible {
  background: #fff6ef;
  border-color: #ffd7bc;
}

.em-notice-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  line-height: 20px;
}

.em-notice-head time,
.em-notice-body {
  font-size: 12px;
  line-height: 20px;
}

.em-notice-head time {
  color: #8c8c8c;
}

.em-unread-dot {
  position: absolute;
  top: 23px;
  left: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4d4f;
}

.em-unread-count {
  margin-left: 6px;
  display: inline-block;
  padding: 0 4px;
  min-width: 16px;
  font-size: 11px;
  line-height: 16px;
  color: #fff;
  background: #ff4d4f;
  text-align: center;
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .em-rule-grid {
    grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) 60px 28px;
    gap: 12px;
  }
  .em-rules {
    padding-inline: 16px;
  }
  .em-rules > .em-edit {
    right: 16px;
  }
  .em-rules .em-rule-grid {
    margin-right: 32px;
  }
}

@media (max-width: 680px) {
  .em-rules {
    overflow-x: auto;
  }
  .em-rule-grid {
    min-width: 345px;
  }
  .notification-drawer.em-notice-drawer .tabs button {
    padding-inline: 6px;
  }
}
