body {
  background: #f4f7fb;
}

.app-shell {
  min-height: 100vh;
}

.card-soft {
  border: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ticket-meta dt {
  color: #64748b;
  font-weight: 600;
}

.ticket-meta dd {
  margin-bottom: 0.75rem;
}

.timeline {
  border-left: 2px solid #dbe4f0;
  margin-left: 0.75rem;
  padding-left: 1.25rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-item::before {
  background: #0d6efd;
  border-radius: 999px;
  content: "";
  height: 0.75rem;
  left: -1.68rem;
  position: absolute;
  top: 0.3rem;
  width: 0.75rem;
}

.badge-status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-status-in_progress {
  background: #fff7cc;
  color: #a16207;
}

.badge-status-resolved {
  background: #dcfce7;
  color: #15803d;
}

.badge-status-closed {
  background: #e2e8f0;
  color: #334155;
}

.priority-low {
  color: #0f766e;
}

.priority-medium {
  color: #0369a1;
}

.priority-high {
  color: #c2410c;
}

.priority-urgent {
  color: #b91c1c;
}

.priority-pill {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.32rem 0.6rem;
}

.priority-pill.priority-low {
  background: #ccfbf1;
  border-color: #99f6e4;
  color: #0f766e;
}

.priority-pill.priority-medium {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #0369a1;
}

.priority-pill.priority-high {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}

.priority-pill.priority-urgent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.priority-filter {
  font-weight: 600;
}

.priority-filter.priority-low {
  background: #f0fdfa;
  border-color: #5eead4;
  color: #0f766e;
}

.priority-filter.priority-medium {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #0369a1;
}

.priority-filter.priority-high {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.priority-filter.priority-urgent {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.ticket-filter-multiselect__toggle {
  overflow: hidden;
  padding-right: 2.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-filter-multiselect__toggle.dropdown-toggle::after {
  display: none;
}

.ticket-filter-multiselect__menu {
  max-height: min(22rem, 60vh);
  max-width: min(28rem, calc(100vw - 2rem));
  min-width: 100%;
  overflow-y: auto;
  width: max-content;
}

.ticket-filter-multiselect__menu .dropdown-item {
  cursor: pointer;
  min-width: 12rem;
  white-space: normal;
}

.ticket-filter-multiselect__menu .dropdown-item:has(.form-check-input:checked) {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}

.ticket-filter-multiselect__menu .form-check-input {
  margin-top: 0.2rem;
}

.ticket-table {
  min-width: 100%;
}

.ticket-table th,
.ticket-table td {
  padding-bottom: 0.75rem;
  padding-top: 0.75rem;
  vertical-align: middle;
}

.ticket-table th {
  font-size: 0.9rem;
  white-space: nowrap;
}

.ticket-table__code,
.ticket-table__status,
.ticket-table__priority,
.ticket-table__date {
  white-space: nowrap;
}

.ticket-table__code {
  min-width: 6.75rem;
}

.ticket-table__code-link {
  white-space: nowrap;
}

.ticket-table__title {
  min-width: 19rem;
}

.ticket-table__category {
  min-width: 8.5rem;
}

.ticket-table__person {
  min-width: 7.25rem;
}

.ticket-table__status {
  min-width: 6.25rem;
}

.ticket-table__priority {
  min-width: 6.5rem;
}

.ticket-table__date {
  min-width: 8rem;
}

.ticket-table--full {
  min-width: 69rem;
}

.ticket-table--compact {
  min-width: 54rem;
}

.attachment-preview-grid,
.attachment-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.attachment-picker {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.attachment-picker--drag-over {
  background: rgba(219, 234, 254, 0.6);
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.15);
}

.attachment-paste-hint {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  color: #475569;
  cursor: text;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
}

.attachment-picker--drag-over .attachment-paste-hint {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.attachment-paste-hint:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
  outline: none;
}

.attachment-feedback.text-success {
  color: #15803d !important;
}

.attachment-feedback.text-danger {
  color: #b91c1c !important;
}

.attachment-preview-item,
.attachment-card {
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}

.attachment-preview-image,
.attachment-thumb {
  background: #e2e8f0;
  display: block;
  height: 160px;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

.attachment-preview-file,
.attachment-file-tile {
  align-items: center;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  height: 160px;
  justify-content: center;
  letter-spacing: 0.08em;
}

.attachment-preview-body,
.attachment-card-body {
  padding: 0.9rem 1rem 1rem;
}

.attachment-preview-name,
.attachment-name {
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.attachment-preview-meta {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.attachment-preview-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  padding: 1rem;
  text-align: center;
}

.attachment-inline-block {
  border-top: 1px solid #e2e8f0;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.attachment-thumb-link {
  color: inherit;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
}

.attachment-gallery--inline {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.attachment-lightbox-body {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: 320px;
  overflow: auto;
  padding: 1rem;
}

.attachment-lightbox-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: min(80vh, 900px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.ticket-detail-page {
  --ticket-surface: #ffffff;
  --ticket-surface-soft: #f8fafc;
  --ticket-surface-muted: #eef3f9;
  --ticket-border: #dce6f2;
  --ticket-border-strong: #c8d6e7;
  --ticket-text: #1f2937;
  --ticket-muted: #667085;
  --ticket-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  --ticket-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.06);
  color: var(--ticket-text);
  display: block;
}

.ticket-icon {
  align-items: center;
  color: inherit;
  display: inline-flex;
  flex-shrink: 0;
  height: 1.1rem;
  justify-content: center;
  width: 1.1rem;
}

.ticket-icon--sm {
  height: 1rem;
  width: 1rem;
}

.ticket-icon svg {
  display: block;
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 100%;
}

.ticket-hero {
  border-bottom: 1px solid var(--ticket-border);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}

.ticket-back-link {
  align-items: center;
  color: #0d6efd;
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.ticket-back-link:hover {
  color: #0b5ed7;
}

.ticket-hero__title {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0;
}

.ticket-hero__chips,
.ticket-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ticket-hero__chips {
  margin-top: 1rem;
}

.ticket-hero__meta {
  color: var(--ticket-muted);
  font-size: 0.98rem;
  margin-top: 1rem;
}

.ticket-meta-item {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
}

.ticket-pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 0.45rem;
  line-height: 1;
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}

.ticket-pill--code {
  background: #1f2937;
  color: #fff;
}

.ticket-pill--category {
  background: #eef2f7;
  border-color: #e1e7f0;
  color: #344054;
}

.ticket-pill--status-open {
  background: #1f6fff;
  color: #fff;
}

.ticket-pill--status-open::before,
.ticket-pill--status-in-progress::before,
.ticket-pill--status-resolved::before,
.ticket-pill--status-closed::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 0.5rem;
  opacity: 0.9;
  width: 0.5rem;
}

.ticket-pill--status-in-progress {
  background: #fff4cc;
  border-color: #f8da7a;
  color: #9a6700;
}

.ticket-pill--status-resolved {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.ticket-pill--status-closed {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #475467;
}

.ticket-pill--priority-low {
  background: #ccfbf1;
  border-color: #99f6e4;
  color: #0f766e;
}

.ticket-pill--priority-medium {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ticket-pill--priority-high {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}

.ticket-pill--priority-urgent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.ticket-panel {
  background: var(--ticket-surface);
  border: 1px solid var(--ticket-border);
  border-radius: 0.95rem;
  box-shadow: var(--ticket-shadow);
  overflow: hidden;
}

.ticket-panel + .ticket-panel {
  margin-top: 1.5rem;
}

.ticket-panel__header,
.ticket-panel__footer,
.ticket-panel__body {
  padding: 1.35rem 1.45rem;
}

.ticket-panel__header {
  align-items: center;
  border-bottom: 1px solid var(--ticket-border);
  display: flex;
  justify-content: space-between;
}

.ticket-panel__header-actions {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.ticket-panel__footer {
  border-top: 1px solid var(--ticket-border);
}

.ticket-section-title {
  align-items: center;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 750;
  gap: 0.7rem;
  letter-spacing: -0.02em;
}

.ticket-description {
  font-size: 1.05rem;
  line-height: 1.75;
}

.ticket-rich-text {
  overflow-wrap: anywhere;
  white-space: normal;
}

.ticket-rich-text p {
  margin: 0;
}

.ticket-rich-text p:empty,
.ticket-rich-text p > br:only-child {
  display: block;
  min-height: 1em;
}

.ticket-rich-text ul,
.ticket-rich-text ol {
  margin: 0;
  padding-left: 1.5rem;
}

.ticket-rich-text li {
  margin: 0;
}

.ticket-rich-text a {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.ticket-rich-text code {
  background: #eef2f7;
  border-radius: 0.25rem;
  color: #9f1239;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
}

.ticket-rich-text pre {
  background: #172033;
  border-radius: 0.5rem;
  color: #f8fafc;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0.65rem 0;
  overflow-x: auto;
  padding: 0.75rem 0.9rem;
  tab-size: 4;
  white-space: pre-wrap;
}

.ticket-rich-text pre code {
  background: transparent;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

.rich-text-editor {
  position: relative;
}

.rich-text-editor .ql-toolbar.ql-snow {
  background: #f8fafc;
  border-color: #ced4da;
  border-radius: 0.5rem 0.5rem 0 0;
  font-family: inherit;
  padding: 0.55rem 0.65rem;
}

.rich-text-editor .ql-container.ql-snow {
  border-color: #ced4da;
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: inherit;
  font-size: 1rem;
}

.rich-text-editor .ql-editor {
  line-height: 1.5;
  min-height: 8rem;
  padding: 0.8rem 0.9rem;
}

.ticket-content-editor .rich-text-editor .ql-editor {
  min-height: 9rem;
}

.rich-text-editor .ql-editor p,
.rich-text-editor .ql-editor ul,
.rich-text-editor .ql-editor ol {
  margin: 0;
}

.rich-text-editor.is-invalid .ql-toolbar.ql-snow,
.rich-text-editor.is-invalid .ql-container.ql-snow {
  border-color: var(--bs-form-invalid-border-color);
}

.rich-text-editor .ql-tooltip {
  z-index: 20;
}

.rich-text-editor .ql-tooltip input[type="text"] {
  min-width: 12rem;
}

.ticket-comment-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.ticket-comment-editor {
  flex: 0 0 auto;
}

.ticket-comment-editor > summary {
  display: inline-flex;
  list-style: none;
}

.ticket-comment-editor > summary::-webkit-details-marker {
  display: none;
}

.ticket-comment-editor__body {
  background: #f8fafc;
  border: 1px solid var(--ticket-border);
  border-radius: 0.65rem;
  margin-top: 0.65rem;
  max-width: calc(100vw - 3rem);
  padding: 0.85rem;
  width: 42rem;
}

.ticket-comment-editor__actions {
  margin-top: 0.75rem;
}

.ticket-comment-edited {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.ticket-comment-deleted {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.55rem;
  color: #64748b;
  font-style: italic;
  padding: 0.65rem 0.75rem;
}

.ticket-content-editor {
  border-bottom: 1px solid var(--ticket-border);
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
}

.ticket-content-editor__textarea {
  border-radius: 0.75rem;
  min-height: 10.5rem;
  padding: 1rem 1.05rem;
  resize: vertical;
}

.ticket-content-editor__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ticket-content-editor__hint {
  color: var(--ticket-muted);
  flex: 1 1 16rem;
  font-size: 0.92rem;
}

.ticket-file-block {
  border-top: 1px solid var(--ticket-border);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.ticket-file-block__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.ticket-file-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-file-list--stacked {
  gap: 0.85rem;
}

.ticket-file-row {
  align-items: stretch;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border: 1px solid var(--ticket-border);
  border-radius: 0.75rem;
  box-shadow: var(--ticket-shadow-soft);
  display: flex;
  gap: 1rem;
  padding: 0.95rem;
}

.ticket-file-row--compact {
  padding: 0.8rem;
}

.ticket-file-row__preview {
  flex: 0 0 7rem;
}

.ticket-file-row__preview--compact {
  flex-basis: 4.5rem;
}

.ticket-file-row__image,
.ticket-sidebar-file__image {
  border-radius: 0.65rem;
  display: block;
  height: 100%;
  max-height: 6rem;
  object-fit: cover;
  width: 100%;
}

.ticket-file-row__image-link,
.ticket-sidebar-file__image-link {
  display: block;
}

.ticket-file-row__file-icon,
.ticket-sidebar-file__icon {
  align-items: center;
  background: linear-gradient(135deg, #1f2937, #475467);
  border-radius: 0.65rem;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  letter-spacing: 0.08em;
  min-height: 4.5rem;
  width: 100%;
}

.ticket-file-row__content,
.ticket-sidebar-file__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.ticket-file-row__name,
.ticket-sidebar-file__name {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
  word-break: break-word;
}

.ticket-file-row__meta,
.ticket-sidebar-file__meta {
  color: var(--ticket-muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.ticket-file-row__actions,
.ticket-sidebar-file__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.ticket-tabs__nav {
  border-bottom: 1px solid var(--ticket-border);
  flex-wrap: nowrap;
  gap: 0.15rem;
  overflow-x: auto;
  padding: 0.85rem 1.1rem 0;
}

.ticket-tabs__nav .nav-link {
  align-items: center;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0.85rem 0.85rem 0 0;
  color: var(--ticket-muted);
  display: inline-flex;
  gap: 0.45rem;
  font-weight: 700;
  padding: 0.9rem 1rem;
  white-space: nowrap;
}

.ticket-tabs__nav .nav-link:hover {
  color: #0d6efd;
}

.ticket-tabs__nav .nav-link.active {
  background: #f6faff;
  border-bottom-color: #0d6efd;
  color: #0d6efd;
}

.ticket-tabs__content {
  padding: 1.45rem;
}

.ticket-empty-state {
  background: #f8fafc;
  border: 1px dashed var(--ticket-border-strong);
  border-radius: 0.75rem;
  color: var(--ticket-muted);
  padding: 1.2rem 1.25rem;
}

.ticket-empty-state--compact {
  padding: 1rem;
}

.ticket-empty-state__title {
  color: var(--ticket-text);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.ticket-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ticket-timeline__item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.25rem minmax(0, 1fr);
}

.ticket-timeline__rail {
  display: flex;
  justify-content: center;
  position: relative;
}

.ticket-timeline__item:not(:last-child) .ticket-timeline__rail::after {
  background: #dbe4f0;
  content: "";
  left: 50%;
  position: absolute;
  top: 0.95rem;
  bottom: -1.25rem;
  transform: translateX(-50%);
  width: 2px;
}

.ticket-timeline__dot {
  background: #2b6ff3;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(43, 111, 243, 0.18);
  display: block;
  height: 0.8rem;
  margin-top: 0.28rem;
  position: relative;
  width: 0.8rem;
  z-index: 1;
}

.ticket-timeline__content {
  min-width: 0;
}

.ticket-timeline__header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ticket-timeline__heading {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.ticket-timeline__title {
  color: var(--ticket-text);
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.3;
}

.ticket-timeline__title--activity strong {
  font-weight: 750;
}

.ticket-timeline__title--activity {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ticket-timeline__meta,
.ticket-timeline__details {
  color: var(--ticket-muted);
  font-size: 0.95rem;
}

.ticket-timeline__time {
  color: var(--ticket-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  padding-top: 0.1rem;
  text-align: right;
  white-space: nowrap;
}

.ticket-timeline__body {
  font-size: 1rem;
  line-height: 1.75;
  margin-top: 0.7rem;
}

.ticket-timeline__attachments {
  border-top: 1px solid var(--ticket-border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.ticket-timeline__attachments-title {
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.ticket-timeline__details {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.5rem;
}

.ticket-stream__avatar {
  align-items: center;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  height: 3rem;
  justify-content: center;
  letter-spacing: 0.03em;
  width: 3rem;
}

.ticket-avatar--blue {
  background: linear-gradient(135deg, #1f6fff, #2563eb);
}

.ticket-avatar--orange {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.ticket-avatar--green {
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.ticket-avatar--slate {
  background: linear-gradient(135deg, #64748b, #334155);
}

.ticket-role-pill {
  background: #eef2f7;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
}

.attachment-gallery--comment {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.ticket-composer__textarea {
  border-radius: 0.75rem;
  min-height: 11rem;
  padding: 1rem 1.05rem;
  resize: vertical;
}

.ticket-composer .mb-3 {
  position: relative;
}

.ticket-mention-suggestions {
  background: #fff;
  border: 1px solid var(--ticket-border);
  border-radius: 0.75rem;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.45rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.35rem;
  position: absolute;
  width: min(100%, 34rem);
  z-index: 20;
}

.ticket-mention-option {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0.55rem;
  color: var(--ticket-text);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
  width: 100%;
}

.ticket-mention-option:hover,
.ticket-mention-option.is-active {
  background: #eef5ff;
}

.ticket-mention-option__name {
  font-weight: 750;
  line-height: 1.25;
}

.ticket-mention-option__meta {
  color: var(--ticket-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.ticket-mention-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.ticket-mention-chip {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 750;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem 0.45rem 0.35rem 0.65rem;
}

.ticket-mention-chip__remove {
  align-items: center;
  background: #dbeafe;
  border: 0;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 1.25rem;
}

.ticket-mention-chip__remove:hover {
  background: #bfdbfe;
}

.ticket-mention {
  background: #eef5ff;
  border-radius: 0.35rem;
  color: #1d4ed8;
  font-weight: 750;
  padding: 0.05rem 0.22rem;
}

.ticket-composer__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ticket-comment-button {
  min-width: 12rem;
}

.ticket-composer__hint {
  color: var(--ticket-muted);
  font-size: 0.92rem;
  flex: 1 1 14rem;
}

.ticket-panel--sidebar .ticket-panel__body {
  padding-bottom: 1.15rem;
  padding-top: 1.15rem;
}

.ticket-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-status-card,
.ticket-action-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-status-card__group + .ticket-person-card,
.ticket-person-card + .ticket-person-card,
.ticket-person-card + .ticket-status-card__group {
  border-top: 1px solid var(--ticket-border);
  padding-top: 1rem;
}

.ticket-status-card__label,
.ticket-action-group__label {
  color: var(--ticket-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.ticket-person-card__row {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.ticket-person-card__name {
  font-weight: 750;
}

.ticket-person-card__role {
  color: var(--ticket-muted);
  font-size: 0.92rem;
}

.ticket-status-card__category,
.ticket-static-field {
  background: #f8fafc;
  border: 1px solid var(--ticket-border);
  border-radius: 0.7rem;
  font-weight: 600;
  padding: 0.9rem 0.95rem;
}

.ticket-save-button {
  width: 100%;
}

.ticket-panel__hint {
  color: var(--ticket-muted);
  font-size: 0.92rem;
  margin-top: 0.75rem;
}

.ticket-sidebar-files {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ticket-sidebar-file {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 3.25rem minmax(0, 1fr);
}

.ticket-sidebar-file__thumb {
  height: 3.25rem;
}

.ticket-sidebar-file__image,
.ticket-sidebar-file__icon {
  height: 100%;
}

.ticket-inline-link {
  background: transparent;
  border: 0;
  color: #0d6efd;
  font-weight: 700;
  margin-top: 1rem;
  padding: 0;
}

.ticket-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0;
}

.ticket-summary-list dt {
  color: var(--ticket-muted);
  font-size: 0.87rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.ticket-summary-list dd {
  font-weight: 600;
  margin: 0;
}

@media (min-width: 1200px) {
  .ticket-sidebar {
    position: sticky;
    top: 1.25rem;
  }
}

@media (max-width: 991.98px) {
  .ticket-file-row {
    flex-direction: column;
  }

  .ticket-file-row__preview {
    flex-basis: auto;
  }
}

@media (max-width: 767.98px) {
  .ticket-hero__meta,
  .ticket-hero__chips {
    gap: 0.55rem;
  }

  .ticket-panel__header,
  .ticket-panel__body,
  .ticket-panel__footer,
  .ticket-tabs__content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ticket-timeline__item,
  .ticket-sidebar-file {
    gap: 0.75rem;
  }

  .ticket-timeline__item {
    grid-template-columns: 1rem minmax(0, 1fr);
  }

  .ticket-timeline__item:not(:last-child) .ticket-timeline__rail::after {
    bottom: -1rem;
  }

  .ticket-stream__avatar {
    height: 2.75rem;
    width: 2.75rem;
  }

  .ticket-timeline__header {
    flex-direction: column;
    gap: 0.35rem;
  }

  .ticket-timeline__time {
    text-align: left;
    white-space: normal;
  }
}

.error-page {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 10rem);
}

.error-page__card {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 1.5rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: minmax(16rem, 0.85fr) minmax(20rem, 1.35fr);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 4rem);
  width: 100%;
}

.error-page__content {
  position: relative;
  z-index: 1;
}

.error-page__eyebrow {
  color: #0d6efd;
  font-size: clamp(3.75rem, 9vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.85;
  margin-bottom: 1.5rem;
}

.error-page__title {
  color: #172033;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.error-page__message {
  color: #64748b;
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 34rem;
}

.error-page__action {
  border-radius: 0.8rem;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
}

.error-page__visual {
  background: #f4f7fb;
  border-radius: 1.25rem;
  overflow: hidden;
}

.error-page__illustration {
  display: block;
  height: auto;
  width: 100%;
}

@media (max-width: 991.98px) {
  .error-page {
    min-height: auto;
  }

  .error-page__card {
    grid-template-columns: 1fr;
  }

  .error-page__visual {
    grid-row: 1;
  }
}

@media (max-width: 575.98px) {
  .error-page__card {
    border-radius: 1rem;
    padding: 1rem;
  }

  .error-page__content {
    padding: 0.5rem;
  }

  .error-page__eyebrow {
    margin-bottom: 1rem;
  }

  .error-page__action {
    width: 100%;
  }
}
.ticket-similarity {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.875rem;
}

.ticket-similarity__message {
  color: var(--bs-body-color);
  font-weight: 600;
}

.ticket-similarity--loading {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
}

.ticket-similarity--warning {
  background: var(--bs-warning-bg-subtle);
  border-color: var(--bs-warning-border-subtle);
}

.ticket-similarity--empty {
  background: var(--bs-success-bg-subtle);
  border-color: var(--bs-success-border-subtle);
}

.ticket-similarity--error {
  background: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
}

.ticket-similarity__results {
  margin-top: 0.75rem;
}

.ticket-similarity__item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.625rem;
  padding: 0.75rem;
}

.ticket-similarity__item + .ticket-similarity__item {
  margin-top: 0.5rem;
}

.ticket-similarity__link {
  font-weight: 600;
  text-decoration: none;
}

.ticket-similarity__metadata {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  margin-top: 0.375rem;
}
