.app-shell .ticket-entry {
  border-color: #bed3ff;
  background: #edf3ff;
  color: #1849a9;
  font-weight: 700;
  white-space: nowrap;
}
.app-shell .ticket-entry:hover { background: #dfeaff; }
.ticket-entry-mobile { display: none; }

.attachment-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 6200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .62);
}
.attachment-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 96vw);
  height: min(820px, 92vh);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .28);
}
.attachment-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.attachment-preview-header strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-preview-header > div { display: flex; gap: 8px; }
.attachment-preview-header a,
.attachment-preview-header button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  line-height: 34px;
  text-decoration: none;
}
.attachment-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  color: var(--ink);
}
.attachment-preview-body iframe { width: 100%; height: 100%; min-height: 620px; border: 0; }
.attachment-preview-body p { margin: 0 0 12px; color: var(--muted); }
.attachment-preview-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 14px/1.75 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.followup-attachments button.attachment-item {
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.field-explicit-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 14px;
  padding: 12px 0 2px;
  background: linear-gradient(rgba(255,255,255,0), #fff 28%);
}
.field-save-status { color: var(--muted); font-size: 13px; }
.field-save-status.is-dirty { color: #9a6700; }
.field-save-status.is-success { color: #087f5b; }

.custom-role-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.role-name-cell small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.role-name-actions { display: flex; gap: 6px; margin-top: 6px; }
.role-name-actions button { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }

@media (max-width: 700px) {
  .ticket-entry-full { display: none; }
  .ticket-entry-mobile { display: inline; }
  .attachment-preview-overlay { padding: 0; }
  .attachment-preview-panel { width: 100vw; height: 100vh; border-radius: 0; }
  .attachment-preview-header { align-items: flex-start; }
  .attachment-preview-header > div { flex-shrink: 0; }
  .attachment-preview-body iframe { min-height: calc(100vh - 96px); }
}
