    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: #f4f6f8;
      color: #1f2937;
    }

    header {
      background: #111827;
      color: white;
      padding: 20px 40px;
    }

    header h1 {
      margin: 0;
      font-size: 26px;
    }

    .container {
      max-width: 1100px;
      margin: 30px auto;
      padding: 0 20px;
    }

    .card {
      background: white;
      border-radius: 10px;
      padding: 24px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .asset-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .status {
      padding: 8px 14px;
      border-radius: 999px;
      background: #dcfce7;
      color: #166534;
      font-weight: bold;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 20px;
    }

    .field {
      background: #f9fafb;
      padding: 12px;
      border-radius: 7px;
    }

    .field strong {
      display: block;
      color: #6b7280;
      font-size: 13px;
      margin-bottom: 4px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 12px;
    }

    th, td {
      text-align: left;
      padding: 12px;
      border-bottom: 1px solid #e5e7eb;
    }

    th {
      color: #6b7280;
      font-size: 13px;
    }

    button {
      background: #2563eb;
      color: white;
      border: none;
      padding: 10px 14px;
      border-radius: 8px;
      cursor: pointer;
      margin-right: 8px;
    }

    button:hover {
      background: #1d4ed8;
    }

    .danger {
      background: #dc2626;
    }

    .danger:hover {
      background: #b91c1c;
    }

    .history-item {
      padding: 12px;
      background: #f9fafb;
      border-radius: 8px;
      margin-top: 10px;
    }

   .ticket-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 18px 0;
  max-width: 700px;
  align-items: flex-start;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
 .ticket-form button {
  width: fit-content;
}

body:not(.app-shell) #mainNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px 15px;
  margin-top: 10px;
  border-bottom: 1px solid #ccc;
}

body:not(.app-shell) #mainNav .nav-left,
body:not(.app-shell) #mainNav .nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

body.app-shell #mainNav .nav-left,
body.app-shell #mainNav .nav-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.nav-user {
  font-size: 0.9rem;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.report-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
} 

.report-card h3 {
  margin-top: 0;
}


.metric-card .metric-value {
  font-size: 2.5rem;
  font-weight: bold;
}
.metric-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
  text-align: center;
}

.metric-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: bold;
}
.ticket-view-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ticket-view-bar a {
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #ccc;
}

.ticket-view-bar a.active-ticket-view {
  font-weight: bold;
  border-color: #333;
  background: #f0f0f0;
}


/* Searchable user picker */
.searchable-user-picker {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.searchable-user-picker input[type="text"] {
  width: 100%;
}

.secondary-button {
  background: #4b5563;
}

.secondary-button:hover {
  background: #374151;
}

.searchable-user-results {
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 20;
}

.searchable-user-option {
  width: 100%;
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}

.searchable-user-option:hover,
.searchable-user-option:focus {
  background: #eff6ff;
  outline: none;
}

.searchable-user-option strong {
  display: block;
}

.searchable-user-option span {
  display: block;
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 2px;
}

.searchable-user-empty {
  padding: 10px 12px;
  color: #6b7280;
}

.hidden {
  display: none;
}

/* Ticket assignment workflow polish */
.ticket-view-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ticket-view-bar a {
  border: 1px solid #d0d7de;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
}

.ticket-view-bar a.active-ticket-view {
  font-weight: 700;
  text-decoration: underline;
}

.ticket-view-help {
  margin-top: 0;
}

.ticket-assignment-summary-field {
  align-items: flex-start;
}

.assignment-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.assignment-action-message {
  align-self: center;
  font-size: 0.9rem;
}

.assignment-action-message-error {
  font-weight: 700;
}

.assignment-select-label {
  font-weight: 600;
  margin-top: 0.25rem;
  width: 100%;
}

.assignment-editor-row,
.assignment-button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.assignment-editor-row select {
  min-width: 18rem;
}

/* Ticket detail workspace layout */
.ticket-detail-page .ticket-detail-container {
  max-width: 1440px;
}

.ticket-detail-hero {
  position: sticky;
  top: 0;
  z-index: 5;
}

.ticket-detail-hero-main {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ticket-detail-hero-main h2 {
  margin-bottom: 0.25rem;
}

.ticket-muted-line {
  color: #6b7280;
  margin: 0;
}

.ticket-quick-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.ticket-assignment-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-top: 1rem;
  padding: 1rem;
}

.ticket-assignment-display-row strong,
.ticket-assignment-display-row span {
  display: block;
}

.ticket-assignment-display-row strong {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.ticket-assignment-display-row span {
  font-weight: 700;
}

.ticket-detail-workspace {
  align-items: flex-start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.ticket-workspace-main,
.ticket-workspace-side {
  min-width: 0;
}

.ticket-workspace-side {
  align-self: start;
  position: sticky;
  top: 1rem;
}

.ticket-side-card,
.ticket-flow-card,
.ticket-work-card {
  margin-bottom: 1rem;
}

.ticket-side-card {
  padding: 18px;
}

.ticket-side-card h3,
.ticket-flow-card h3,
.ticket-work-card h3 {
  margin-top: 0;
}

.compact-ticket-form {
  max-width: none;
}

.ticket-form-row {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.two-column-form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-form-row {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.inline-checkbox-field {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-height: 42px;
}

.inline-checkbox-field input {
  width: auto;
}

.table-scroll-x {
  overflow-x: auto;
}

.ticket-work-update-form {
  max-width: none;
}

.ticket-work-update-form textarea {
  min-height: 7rem;
}

@media (max-width: 1100px) {
  .ticket-detail-workspace {
    grid-template-columns: 1fr;
  }

  .ticket-workspace-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .ticket-detail-hero {
    position: static;
  }

  .ticket-detail-hero-main,
  .assignment-editor-row,
  .assignment-button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-quick-grid,
  .two-column-form-row,
  .three-column-form-row {
    grid-template-columns: 1fr;
  }

  .assignment-editor-row select {
    min-width: 0;
    width: 100%;
  }
}

/* Ticket header inline workflow controls */
.ticket-inline-control {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
}

.ticket-inline-control label,
.ticket-inline-control-card strong {
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 700;
}

.ticket-header-select {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #111827;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 32px 8px 12px;
}

.ticket-status-control .status-select {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.ticket-inline-control-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.inline-action-message {
  color: #6b7280;
  display: block;
  font-size: 0.82rem;
  min-height: 1em;
}

.inline-action-message-error {
  color: #b91c1c;
  font-weight: 700;
}

.ticket-linked-asset-display {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ticket-linked-asset-display a {
  font-weight: 700;
}

.ticket-linked-asset-display span {
  color: #6b7280;
  font-size: 0.85rem;
}

.linked-asset-header-editor {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.linked-asset-header-editor input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
  padding: 10px;
  width: 100%;
}

.inline-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

button.secondary {
  background: #6b7280;
}

button.secondary:hover {
  background: #4b5563;
}

.ticket-properties-help-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #4b5563;
  font-size: 0.9rem;
  padding: 10px 12px;
}

@media (max-width: 760px) {
  .ticket-inline-control {
    align-items: stretch;
    width: 100%;
  }

  .ticket-header-select {
    border-radius: 8px;
    width: 100%;
  }
}

/* Ticket header command strip */
.ticket-command-strip {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1fr) minmax(320px, 1.15fr);
  margin-top: 1rem;
}

.ticket-command-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-width: 0;
  padding: 0.85rem;
}

.ticket-command-card h3 {
  color: #4b5563;
  font-size: 0.9rem;
  margin: 0 0 0.65rem;
}

.ticket-command-fields {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ticket-command-fields-stacked {
  flex-direction: column;
}

.ticket-command-card .ticket-inline-control {
  align-items: stretch;
  flex: 1 1 130px;
  min-width: 0;
}

.ticket-command-card .ticket-header-select {
  width: 100%;
}

.ticket-priority-control .priority-select {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.ticket-command-card .field {
  margin: 0;
}

.ticket-requester-compact strong,
.ticket-requester-compact span {
  display: block;
}

.ticket-requester-compact strong {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.ticket-command-card .ticket-assignment-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}

.ticket-command-inline-panel {
  display: block;
}

.ticket-link-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  cursor: pointer;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  text-align: left;
  width: 100%;
}

.ticket-link-button:hover {
  background: #f3f4f6;
}

.ticket-link-button span:first-child {
  font-weight: 700;
}

.ticket-link-button-hint {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ticket-summary-toggle {
  min-height: 42px;
}

.assignment-inline-editor,
.ticket-inline-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  margin-top: 0.55rem;
  padding: 0.75rem;
  width: 100%;
}

.ticket-inline-panel-wide {
  max-height: 360px;
  overflow: auto;
}

.ticket-followers-panel,
.ticket-command-card-relationships {
  position: relative;
}

.ticket-followers-panel {
  width: 100%;
}

.ticket-asset-command-row {
  margin-top: 0.75rem;
}

.ticket-asset-command-row .ticket-linked-asset-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem;
}

@media (max-width: 1180px) {
  .ticket-command-strip {
    grid-template-columns: 1fr 1fr;
  }

  .ticket-command-card-relationships {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .ticket-command-strip {
    grid-template-columns: 1fr;
  }
}


/* Compact ticket detail header pass */
.ticket-title-editor {
  min-width: 0;
  width: 100%;
}

.ticket-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-number-label {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.ticket-title-input {
  flex: 1 1 360px;
  font-size: 1.15rem;
  font-weight: 700;
  min-width: 240px;
  padding: 0.45rem 0.6rem;
}

.ticket-title-save-button {
  white-space: nowrap;
}

.compact-ticket-command-strip {
  align-items: start;
  gap: 0.5rem;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.15fr) minmax(280px, 0.85fr);
  margin-top: 0.65rem;
}

.compact-ticket-command-strip .ticket-command-card {
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.compact-ticket-command-strip .ticket-command-card h3 {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.compact-ticket-command-strip .ticket-command-fields {
  gap: 0.45rem;
}

.compact-ticket-command-strip .ticket-command-fields-stacked {
  gap: 0.45rem;
}

.compact-ticket-command-strip .ticket-inline-control label,
.compact-ticket-command-strip .ticket-requester-compact strong,
.compact-ticket-command-strip .ticket-assignment-display-row strong {
  font-size: 0.72rem;
  margin-bottom: 0.12rem;
}

.compact-ticket-command-strip .ticket-header-select,
.compact-ticket-command-strip .ticket-link-button {
  min-height: 34px;
  padding: 0.38rem 0.5rem;
}

.compact-ticket-command-strip .ticket-summary-toggle {
  min-height: 34px;
}

.compact-assignment-editor-row {
  gap: 0.4rem;
}

.compact-assignment-editor-row select {
  flex: 1 1 180px;
  min-width: 180px;
}

.compact-assignment-editor-row button {
  white-space: nowrap;
}

.compact-assignment-editor-row .assignment-action-message {
  flex: 1 1 140px;
}

.compact-ticket-command-strip .assignment-inline-editor,
.compact-ticket-command-strip .ticket-inline-panel {
  border-radius: 8px;
  margin-top: 0.4rem;
  padding: 0.5rem;
}

@media (max-width: 1180px) {
  .compact-ticket-command-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .ticket-title-input {
    flex-basis: 100%;
    min-width: 0;
  }

  .compact-ticket-command-strip {
    grid-template-columns: 1fr;
  }
}

/* Ticket workflow header polish */
.compact-ticket-command-strip {
  grid-template-columns: minmax(420px, 1.35fr) minmax(360px, 1.05fr) minmax(280px, 0.8fr);
}

.compact-ticket-command-strip .ticket-command-card-workflow .ticket-command-fields {
  align-items: flex-start;
}

.compact-ticket-command-strip .ticket-command-card-workflow .ticket-inline-control {
  flex: 1 1 130px;
}

.compact-ticket-command-strip .ticket-command-card-workflow .ticket-linked-asset-control {
  flex: 1.8 1 260px;
}

.ticket-linked-asset-control .ticket-linked-asset-display {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  min-height: 34px;
  padding: 0.38rem 0.5rem;
}

.ticket-linked-asset-control .ticket-linked-asset-display a,
.ticket-linked-asset-control .ticket-linked-asset-display span {
  display: inline;
  font-size: 0.86rem;
}

.ticket-linked-asset-control .linked-asset-header-editor {
  margin-top: 0.35rem;
}

.ticket-linked-asset-control .linked-asset-header-editor input[list] {
  width: 100%;
}

.compact-inline-button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.compact-inline-button-row button {
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.ticket-description-command-row {
  margin-top: 0.65rem;
}

.ticket-description-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.65rem;
}

.ticket-description-card-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ticket-description-card-heading strong {
  color: #4b5563;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticket-description-card-heading span {
  color: #6b7280;
  font-size: 0.78rem;
}

.ticket-description-display {
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.35;
  max-height: 4.2rem;
  overflow: auto;
  white-space: pre-wrap;
}

.ticket-properties-help-text {
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .compact-ticket-command-strip {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ticket detail realignment pass: workflow header + context side panel */
.ticket-detail-hero .compact-ticket-command-strip {
  grid-template-columns: 1fr;
}

.ticket-detail-hero .ticket-command-card-workflow .ticket-command-fields {
  align-items: flex-start;
  gap: 0.5rem;
}

.ticket-detail-hero .ticket-command-card-workflow .ticket-inline-control {
  flex: 1 1 150px;
}

.ticket-description-main-row {
  margin-bottom: 1rem;
  margin-top: 0;
}

.ticket-workspace-side .ticket-command-fields-stacked {
  gap: 0.65rem;
}

.ticket-side-card-people .ticket-assignment-panel,
.ticket-side-card-relationships .ticket-command-fields {
  width: 100%;
}

.ticket-side-card-people .ticket-requester-compact {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

/* Keep assignment controls as part of People, not as a nested card. */
.ticket-side-card-people .ticket-assignment-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0.65rem;
  padding: 0;
  width: 100%;
}

.ticket-side-card-people .assignment-quick-actions {
  margin-top: 0;
}

.ticket-side-card-people .assignment-select-label {
  color: #6b7280;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  margin-top: 0;
}

.ticket-side-card-people .compact-assignment-editor-row {
  align-items: stretch;
  gap: 0.4rem;
}

.ticket-side-card-people .compact-assignment-editor-row select {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
}

.ticket-side-card-people .compact-assignment-editor-row button {
  flex: 1 1 auto;
  margin-right: 0;
  padding: 0.45rem 0.55rem;
}

.ticket-side-linked-asset-control {
  align-items: stretch;
  display: block;
}

.ticket-side-linked-asset-control > label {
  color: #6b7280;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.ticket-side-linked-asset-control .ticket-linked-asset-display {
  margin-bottom: 0.5rem;
}

.ticket-side-linked-asset-control .linked-asset-header-editor input[list] {
  width: 100%;
}

.ticket-side-card-relationships .ticket-summary-toggle + .ticket-inline-panel {
  margin-bottom: 0.65rem;
}

/* Ticket time/activity unification */
.ticket-side-card-time .ticket-total-time-line {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 0 0 0.75rem 0;
  padding: 0.55rem 0.65rem;
}

.ticket-time-entry-form textarea {
  min-height: 5rem;
}

.ticket-time-entry-form .inline-checkbox-field {
  align-self: flex-start;
  min-height: auto;
}

.history-item-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.history-item-heading span {
  color: #374151;
  font-weight: 600;
}

.history-item-heading time {
  color: #6b7280;
  font-size: 0.82rem;
}

.history-item.activity-type-time_entry_added {
  border-left: 4px solid #2563eb;
}

.history-item.activity-type-time_entry_deleted {
  border-left: 4px solid #dc2626;
}

.ticket-timeline-card .ticket-muted-line {
  margin-top: -0.25rem;
}

.ticket-timeline-list {
  margin-top: 0.75rem;
}

.timeline-note-item {
  border-left: 4px solid #6b7280;
}

.timeline-note-item.timeline-note-public {
  border-left-color: #16a34a;
}

.timeline-note-item.timeline-note-internal {
  border-left-color: #7c3aed;
}

.timeline-note-item .history-item-heading span {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
}

/* Work composer support row: compact workflow checklist beside time entry. */
.work-update-support-row {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  margin-top: 0.75rem;
  width: 100%;
}

.ticket-workflow-inline-panel,
.work-update-time-inline {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
}

.ticket-workflow-inline-panel {
  border-left: 4px solid #7c8db5;
  min-width: 0;
}

.ticket-workflow-inline-panel h3 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.compact-ticket-section-heading-row {
  gap: 0.5rem;
}

.compact-ticket-tasks-list {
  gap: 0.45rem;
  margin-top: 0.55rem;
  max-height: 14rem;
  overflow: auto;
}

.work-update-time-inline {
  min-width: 0;
}

.work-update-submit-row {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.work-update-time-content {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-update-time-summary {
  align-items: baseline;
  display: flex;
  gap: 0.35rem;
  margin-right: auto;
  white-space: nowrap;
}

.work-update-time-summary span:first-child {
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.work-update-time-fields {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-update-time-fields label {
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

.work-update-time-field,
.work-update-date-field {
  display: flex;
  flex-direction: column;
}

.work-update-time-field {
  max-width: 7rem;
}

.work-update-date-field {
  max-width: 10rem;
}

.work-update-billable-field {
  align-self: center;
  margin: 0;
  white-space: nowrap;
}

.work-update-time-inline .inline-action-message {
  flex-basis: 100%;
  font-size: 0.8rem;
}

.work-update-submit-button {
  min-width: 9rem;
}

@media (max-width: 900px) {
  .work-update-support-row {
    grid-template-columns: 1fr;
  }

  .work-update-time-inline {
    min-width: 0;
    width: 100%;
  }

  .work-update-submit-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .work-update-time-content,
  .work-update-time-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .work-update-time-summary {
    margin-right: 0;
  }

  .work-update-time-field,
  .work-update-date-field {
    max-width: none;
  }

  .work-update-billable-field {
    align-self: flex-start;
  }
}

/* Ticket evidence panel */
.ticket-side-card-heading-row {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.ticket-side-card-heading-row h3 {
  margin-bottom: 0.15rem;
}

.ticket-side-card-evidence {
  border-color: #dbeafe;
}

.ticket-evidence-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ticket-evidence-item {
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 64px minmax(0, 1fr);
  padding: 0.55rem;
}

.ticket-evidence-preview {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #374151;
  cursor: pointer;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 56px;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  width: 64px;
}

.ticket-evidence-preview img {
  display: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ticket-evidence-preview img.loaded {
  display: block;
}

.ticket-evidence-file-icon {
  text-transform: uppercase;
}

.ticket-evidence-details {
  min-width: 0;
}

.ticket-evidence-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-evidence-meta {
  display: block;
  margin-top: 0.15rem;
}

.ticket-evidence-upload {
  border-top: 1px solid #e5e7eb;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
}

.ticket-evidence-upload summary {
  color: #2563eb;
  cursor: pointer;
  font-weight: 700;
}

.ticket-evidence-upload-form {
  margin-top: 0.6rem;
}

/* Ticket evidence polish */
.ticket-evidence-summary {
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #3730a3;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.ticket-evidence-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.15rem;
}

.ticket-evidence-badge {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #374151;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 0.22rem 0.42rem;
  text-transform: uppercase;
}

.ticket-evidence-visibility-public {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.ticket-evidence-visibility-internal {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.ticket-side-card-evidence .ticket-muted-line {
  font-size: 0.78rem;
}

.ticket-evidence-item-image {
  border-color: #bfdbfe;
}

/* Workflow Tasks */
.ticket-tasks-card {
  border-left: 4px solid #7c8db5;
}

.ticket-workspace-main .ticket-tasks-card {
  margin-bottom: 0;
}

.ticket-section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ticket-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.ticket-task-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #d9dee8;
  border-radius: 10px;
  background: #ffffff;
}

.ticket-task-item-completed {
  background: #f4f8f4;
  border-color: #b9d8bd;
}

.ticket-task-main {
  flex: 1;
  min-width: 0;
}

.ticket-task-check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.ticket-task-check-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.ticket-task-item p {
  margin: 0.35rem 0 0;
  color: #4d596d;
}

.ticket-task-item-completed strong {
  text-decoration: line-through;
  color: #52605f;
}

.ticket-task-meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #697386;
}

.ticket-task-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff3cd;
  color: #755600;
}

.ticket-task-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.ticket-task-actions button {
  white-space: nowrap;
}

.ticket-task-add-panel {
  margin-top: 0.85rem;
}

.ticket-task-form textarea {
  min-height: 4rem;
}


/* Compact task layout when workflow tasks live inside the Work Update composer. */
.ticket-workflow-inline-panel .ticket-task-item {
  gap: 0.45rem;
  padding: 0.55rem;
}

.ticket-workflow-inline-panel .ticket-task-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-workflow-inline-panel .ticket-task-actions button {
  margin-right: 0;
  padding: 0.35rem 0.5rem;
}

.ticket-workflow-inline-panel .ticket-task-add-panel {
  margin-top: 0.55rem;
}

.ticket-workflow-inline-panel .ticket-task-form {
  gap: 0.45rem;
  margin-bottom: 0;
}

.ticket-workflow-inline-panel .ticket-task-form textarea {
  min-height: 3rem;
}

/* Workflow task template controls live inside the compact ticket task panel. */
.ticket-task-template-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  margin-top: 0.55rem;
  padding: 0.5rem;
}

.ticket-task-template-panel label {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.ticket-task-template-apply-row {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.ticket-task-template-apply-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-task-template-apply-row button {
  flex: 0 0 auto;
  margin-right: 0;
  padding: 0.4rem 0.6rem;
}

.ticket-task-template-save-panel {
  margin-top: 0.45rem;
}

.ticket-task-template-save-panel summary {
  color: #374151;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.ticket-task-template-form {
  margin-top: 0.45rem;
}

.ticket-task-template-form textarea {
  min-height: 3rem;
}


.ticket-template-helper-text {
  margin: 0.35rem 0 0;
}


.ticket-task-template-panel {
  position: relative;
}

.ticket-template-preview-panel {
  background: #ffffff;
  border: 1px solid #cfd7e6;
  border-radius: 0.55rem;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
  margin-top: 0.45rem;
  padding: 0.65rem;
  position: absolute;
  right: 0;
  top: 100%;
  width: min(28rem, 100%);
  z-index: 20;
}

.ticket-task-template-panel:hover .ticket-template-preview-panel:not(.hidden),
.ticket-task-template-panel:focus-within .ticket-template-preview-panel:not(.hidden) {
  display: block;
}

.ticket-template-preview-heading {
  align-items: baseline;
  display: flex;
  gap: 0.55rem;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.ticket-template-preview-heading strong {
  color: #111827;
}

.ticket-template-preview-heading span {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.ticket-template-preview-body p {
  color: #4b5563;
  font-size: 0.82rem;
  margin: 0.25rem 0 0.5rem;
}

.ticket-template-preview-list {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0.5rem 0 0;
  max-height: 12rem;
  overflow: auto;
  padding: 0;
}

.ticket-template-preview-list li {
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
}

.ticket-template-preview-list li span:first-child {
  color: #111827;
  font-size: 0.84rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-template-preview-badge {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.12rem 0.38rem;
}

.ticket-template-preview-badge-required {
  background: #fff3cd;
  color: #755600;
}

.ticket-template-preview-badge-optional {
  background: #eef2ff;
  color: #384a92;
}

.ticket-template-preview-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.ticket-template-preview-actions button {
  margin-right: 0;
  padding: 0.4rem 0.55rem;
}


/* Workflow task template management page */
.task-template-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(28rem, 1.5fr);
}

.task-template-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.task-template-list-item {
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  color: #111827;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  margin: 0;
  padding: 0.7rem 0.8rem;
  text-align: left;
  width: 100%;
}

.task-template-list-item:hover,
.task-template-list-item-active {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.task-template-list-item small {
  color: #6b7280;
  display: block;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.task-template-count {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.2rem 0.45rem;
}

.task-template-form {
  margin-top: 0.75rem;
}

.task-template-editor-actions {
  align-items: center;
  flex-wrap: wrap;
}

.task-template-items-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.task-template-item-row {
  align-items: start;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.7rem;
}

.task-template-item-main {
  min-width: 0;
}

.task-template-item-title-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.task-template-item-main p {
  color: #4b5563;
  margin: 0.25rem 0;
}

.task-template-item-main small {
  color: #6b7280;
}

.task-template-item-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.task-template-item-actions button {
  margin-right: 0;
}

.task-template-item-add-panel {
  margin-top: 1rem;
}

.task-template-item-add-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.task-template-item-form {
  margin-top: 0.75rem;
}

.task-template-item-options-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.task-template-item-options-row input[type="number"] {
  max-width: 7rem;
}

@media (max-width: 1000px) {
  .task-template-layout {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 900px) {
  .ticket-template-preview-panel {
    position: static;
    width: 100%;
  }
}

/* Ticket type workflow foundation */
.ticket-type-management-list {
  display: grid;
  gap: 1.15rem;
}

.ticket-type-management-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

.ticket-type-workflow-card {
  border-left: 5px solid #4f46e5;
}

.ticket-type-management-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ticket-type-card-label {
  color: #6b7280;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.ticket-type-management-heading h3 {
  margin-bottom: 0.2rem;
}

.ticket-type-management-heading p {
  color: #6b7280;
  margin: 0;
}

.ticket-type-workflow-count-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
}

.ticket-type-workflow-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  margin-top: 0.95rem;
  padding: 0.9rem;
}

.ticket-type-workflow-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ticket-type-workflow-heading strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.ticket-type-workflow-empty-state {
  background: #ffffff;
  border: 1px dashed #94a3b8;
  border-radius: 0.65rem;
  color: #475569;
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
}

.ticket-type-workflow-empty-state strong {
  color: #334155;
}

.ticket-type-workflow-empty-state span {
  font-size: 0.88rem;
}

.ticket-type-workflow-rule-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.ticket-type-workflow-rule-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 0.65rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
}

.ticket-type-workflow-rule-main {
  display: grid;
  gap: 0.15rem;
}

.ticket-type-workflow-template-pill {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  text-transform: uppercase;
  width: fit-content;
}

.ticket-type-workflow-rule-row small {
  color: #6b7280;
  display: block;
}

.ticket-type-workflow-add-panel {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 0.65rem;
  padding: 0.75rem;
}

.ticket-type-workflow-add-heading {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.ticket-type-workflow-add-heading span {
  color: #4b5563;
  font-size: 0.85rem;
}

.ticket-type-workflow-add-row {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(16rem, 1fr) 5rem auto;
}

.ticket-type-workflow-add-row select,
.ticket-type-workflow-add-row input {
  min-width: 0;
  width: 100%;
}

@media (max-width: 800px) {
  .ticket-type-management-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-type-workflow-count-badge {
    width: fit-content;
  }

  .ticket-type-workflow-add-row {
    grid-template-columns: 1fr;
  }

  .ticket-type-workflow-rule-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Ticket type list/detail flow */
.ticket-type-list-hero {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.ticket-type-create-form {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(16rem, 1fr) auto minmax(8rem, 0.5fr);
}

.ticket-type-list-toolbar {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ticket-type-list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.ticket-type-list-controls input,
.ticket-type-list-controls select {
  min-width: 12rem;
}

.ticket-type-table-wrap {
  margin-top: 0.5rem;
}

.ticket-type-list-table tbody tr {
  cursor: pointer;
}

.ticket-type-list-table tbody tr:hover {
  background: #f8fafc;
}

.ticket-type-list-name {
  color: #1f2937;
  font-weight: 800;
  text-decoration: none;
}

.ticket-type-list-name:hover {
  text-decoration: underline;
}

.compact-ticket-type-count-badge {
  display: inline-block;
  width: fit-content;
}

.button-link {
  background: #2563eb;
  border-radius: 0.4rem;
  color: #ffffff;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.65rem;
  text-decoration: none;
}

.button-link:hover {
  background: #1d4ed8;
}

.ticket-type-status-badge {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.6rem;
}

.ticket-type-status-inactive {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.ticket-type-status-active {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.ticket-type-detail-hero {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ticket-type-detail-hero h2 {
  margin-top: 0.45rem;
}

.ticket-type-detail-layout {
  display: grid;
  gap: 1rem;
}

.ticket-type-detail-main {
  display: grid;
  gap: 1rem;
}

.ticket-type-detail-form {
  display: grid;
  gap: 0.55rem;
}

.ticket-type-detail-form textarea {
  resize: vertical;
}

.ticket-type-detail-section-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ticket-type-workflow-detail-card {
  border-left: 5px solid #4f46e5;
}

.ticket-type-detail-workflow-add-panel {
  margin-top: 0.85rem;
}

.ticket-type-coming-soon-card {
  background: #f8fafc;
  border-style: dashed;
}

@media (max-width: 900px) {
  .ticket-type-create-form,
  .ticket-type-list-toolbar {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .ticket-type-list-controls {
    justify-content: stretch;
  }

  .ticket-type-list-controls input,
  .ticket-type-list-controls select {
    width: 100%;
  }

  .ticket-type-detail-hero {
    flex-direction: column;
  }
}


/* Ticket type request form field configuration */
.ticket-type-request-fields-card {
  border-left: 4px solid #8b5cf6;
}

.ticket-type-request-field-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ticket-type-request-field-row .ticket-type-workflow-template-pill {
  background: #ede9fe;
  color: #5b21b6;
}

.ticket-type-detail-request-field-add-panel {
  margin-top: 0.85rem;
}

.ticket-type-request-field-required {
  align-items: center;
  white-space: nowrap;
}

.required-field-marker {
  color: #b91c1c;
  font-weight: 700;
  margin-left: 0.2rem;
}

.dynamic-ticket-field label {
  align-items: center;
  display: inline-flex;
  gap: 0.15rem;
}

.custom-field-model-note {
  margin-top: 0;
  margin-bottom: 1rem;
}


.create-ticket-helper-text {
  margin-top: -0.35rem;
  margin-bottom: 0.85rem;
}


/* Create ticket initial attachments */
.create-ticket-attachments-field {
  width: 100%;
}

.selected-attachments-list {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: #374151;
  font-size: 0.92rem;
}

.selected-attachments-list li {
  margin: 4px 0;
}

/* Ticket detail reclassification / request fields */
.ticket-type-workflow-apply-option {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.ticket-type-save-button {
  margin-top: 0.35rem;
  width: fit-content;
}

.ticket-type-save-button-active {
  font-weight: 700;
}

.ticket-request-fields-card {
  margin-bottom: 1rem;
}

.ticket-request-fields-form {
  display: grid;
  gap: 0.75rem;
}

.ticket-request-field {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.ticket-field-warning {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b45309;
}


.ticket-task-workflow-helper {
  margin: 0 0 0.75rem;
}


/* Ticket detail single-save property workflow */
.ticket-single-save-row {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.primary-action-button {
  background: #2563eb;
  border: 1px solid #1d4ed8;
  color: #ffffff;
  font-weight: 800;
}

.primary-action-button:hover {
  background: #1d4ed8;
}

.ticket-command-card-workflow .inline-action-message {
  min-height: 1.1rem;
}

.ticket-title-save-button.hidden,
.ticket-type-save-button.hidden,
#saveCustomFieldsBtn.hidden,
#saveAssignmentBtn.hidden {
  display: none !important;
}

/* Combined workflow request details and tasks */
.ticket-workflow-subsection {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.ticket-workflow-subsection-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.ticket-workflow-subsection-heading strong {
  color: #111827;
  font-size: 0.9rem;
}

.ticket-tasks-card .ticket-request-fields-card {
  margin-bottom: 0;
}

.ticket-tasks-card .ticket-request-fields-form {
  gap: 0.55rem;
}

.ticket-tasks-card .ticket-request-field {
  background: #ffffff;
}

/* Ticket type admin cleanup */
.admin-model-note {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.07);
  color: var(--text-muted, #475569);
}

.admin-model-note strong {
  color: var(--text-main, #0f172a);
}

.admin-model-note a {
  font-weight: 700;
}

.field-usage-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted, #475569);
  font-size: 0.85rem;
  font-weight: 700;
}

.field-usage-pill-attached {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.ticket-type-detail-page .ticket-type-request-fields-card {
  border-color: rgba(37, 99, 235, 0.18);
}

/* Ticket type admin polish */
.ticket-type-detail-hero-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ticket-type-summary-badge {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
}

.ticket-type-config-row {
  align-items: stretch;
}

.ticket-type-config-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.ticket-type-config-row-actions label {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.35rem;
}

.ticket-type-config-row-actions input[type="number"] {
  max-width: 5.5rem;
  min-width: 4.5rem;
}

.ticket-type-config-required-toggle {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
}

.ticket-type-workflow-add-heading a,
.admin-model-note a {
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.ticket-type-workflow-add-heading a:hover,
.admin-model-note a:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .ticket-type-detail-hero-actions {
    align-items: flex-start;
  }

  .ticket-type-config-row-actions {
    justify-content: flex-start;
  }
}

/* Quick Actions */
.settings-split-layout.quick-actions-settings-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}

.quick-action-form textarea,
.quick-action-form input,
.quick-action-form select {
  width: 100%;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-action-settings-item {
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card-background, #fff);
}

.quick-action-row-actions {
  flex-shrink: 0;
}

.quick-action-ticket-panel {
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--subtle-background, #f8fafc);
}

.quick-action-ticket-row {
  align-items: end;
}

.quick-action-apply-cell {
  display: flex;
  align-items: end;
}

.quick-action-preview {
  border: 1px dashed var(--border-color, #d8dee9);
  border-radius: 10px;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--card-background, #fff);
}

.quick-action-preview-block + .quick-action-preview-block {
  border-top: 1px solid var(--border-color, #d8dee9);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.quick-action-preview-block p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .settings-split-layout.quick-actions-settings-layout {
    grid-template-columns: 1fr;
  }

  .quick-action-settings-item {
    flex-direction: column;
  }
}

/* Personal Quick Actions */
.my-quick-action-panel {
  margin-top: 0.85rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 0.75rem;
}

.my-quick-action-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.my-quick-action-form {
  margin-top: 0.75rem;
}

.my-quick-actions-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.my-quick-action-item {
  align-items: flex-start;
}

.my-quick-action-active-field {
  align-self: end;
  min-height: 2.6rem;
}


/* Ticket list triage cleanup */
.page-header-row,
.ticket-list-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.primary-link-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.primary-link-button:hover {
  background: #1d4ed8;
}

.muted-text {
  color: #6b7280;
  margin-top: 4px;
}

.ticket-triage-card h3 {
  margin-top: 0;
  margin-bottom: 4px;
}

.ticket-filter-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.ticket-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
}

.ticket-filter-search {
  min-width: 0;
}

.ticket-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
  font-weight: 600;
}

.ticket-filter-grid input,
.ticket-filter-grid select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-weight: normal;
}

.ticket-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.table-scroll {
  overflow-x: auto;
}

.ticket-list-table {
  min-width: 920px;
}

@media (max-width: 1050px) {
  .ticket-filter-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .ticket-filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .page-header-row,
  .ticket-list-header {
    flex-direction: column;
  }

  .ticket-filter-grid {
    grid-template-columns: 1fr;
  }

  .ticket-filter-search {
    grid-column: auto;
  }
}

.ticket-subject-link {
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
}

.ticket-subject-link:hover {
  text-decoration: underline;
}

.ticket-status-badge,
.ticket-priority-badge,
.ticket-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ticket-status-open {
  background: #dbeafe;
  color: #1e40af;
}

.ticket-status-in-progress {
  background: #fef3c7;
  color: #92400e;
}

.ticket-status-waiting {
  background: #ede9fe;
  color: #5b21b6;
}

.ticket-status-resolved,
.ticket-status-closed {
  background: #dcfce7;
  color: #166534;
}

.ticket-priority-low {
  background: #e0f2fe;
  color: #075985;
}

.ticket-priority-medium {
  background: #fef9c3;
  color: #854d0e;
}

.ticket-priority-high {
  background: #fee2e2;
  color: #991b1b;
}

.ticket-type-chip {
  background: #eef2ff;
  color: #3730a3;
}

.ticket-type-chip-empty {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px dashed #d1d5db;
}

/* Requester portal foundation */
.requester-portal-page {
  background: #f6f7fb;
}

.portal-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.portal-header h1 {
  margin-right: 1rem;
}

.portal-nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portal-nav a {
  border-radius: 999px;
  color: inherit;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a:focus {
  background: rgba(255, 255, 255, 0.16);
}

.nav-link-button.active-nav-link,
.nav-link-button[aria-current="page"] {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
  font-weight: 700;
}

.nav-link-button.active-nav-link:hover,
.nav-link-button.active-nav-link:focus,
.nav-link-button[aria-current="page"]:hover,
.nav-link-button[aria-current="page"]:focus {
  background: #bae6fd;
  color: #075985;
}

.portal-nav a.active-portal-link,
.portal-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.portal-logout-button {
  flex: 0 0 auto;
}

.requester-portal-container {
  max-width: 1180px;
}

.portal-hero {
  padding: 2rem;
}

.portal-hero h2,
.portal-placeholder-card h2 {
  margin-bottom: 0.5rem;
}

.portal-eyebrow,
.portal-action-kicker {
  color: #5b6475;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.portal-card-grid,
.portal-asset-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1rem;
}

.portal-action-card {
  color: inherit;
  display: block;
  min-height: 155px;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.portal-action-card:hover,
.portal-action-card:focus {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.portal-action-card-muted {
  opacity: 0.78;
}

.portal-list-toolbar {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  margin-bottom: 1rem;
}

.portal-list-toolbar label {
  display: grid;
  gap: 0.35rem;
}

.portal-asset-card {
  background: #fff;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.portal-asset-meta,
.portal-ticket-meta {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.portal-asset-meta div,
.portal-ticket-meta div {
  display: grid;
  gap: 0.15rem;
}

.portal-asset-meta dt,
.portal-ticket-meta dt {
  color: #5b6475;
  font-size: 0.8rem;
  font-weight: 700;
}

.portal-asset-meta dd,
.portal-ticket-meta dd {
  margin: 0;
}

.portal-empty-state {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.portal-asset-picker {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.portal-asset-picker button {
  text-align: left;
}

.portal-success-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-request-detail-grid {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.portal-request-detail-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.portal-request-main-column,
.portal-request-side-column {
  display: grid;
  gap: 1rem;
}

.portal-conversation-list {
  display: grid;
  gap: 0.75rem;
}

.portal-conversation-item {
  border: 1px solid #dfe3ec;
  border-radius: 10px;
  padding: 0.85rem;
}

.portal-conversation-meta {
  align-items: center;
  color: #5b6475;
  display: flex;
  font-size: 0.85rem;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.portal-attachment-list {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.portal-attachment-link {
  border: 1px solid #dfe3ec;
  border-radius: 8px;
  display: block;
  padding: 0.5rem 0.65rem;
  text-decoration: none;
}

.secondary-link-button {
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

@media (max-width: 900px) {
  .portal-request-detail-grid,
  .portal-list-toolbar {
    grid-template-columns: 1fr;
  }

  .portal-request-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Requester portal request detail polish */
.portal-page-actions {
  margin: 0 0 1rem;
}

.portal-request-detail-page .portal-request-detail-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9fd 100%);
  border: 1px solid #dfe3ec;
  margin-bottom: 1rem;
}

.portal-request-hero-copy h2 {
  margin: 0.15rem 0 0.4rem;
}

.portal-request-hero-status {
  align-items: flex-end;
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  min-width: 170px;
}

.portal-status-label {
  color: #5b6475;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-card-heading-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.portal-card-heading-row h3,
.portal-request-status-card h3 {
  margin-top: 0;
}

.portal-request-description-display {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  line-height: 1.55;
  padding: 1rem;
  white-space: pre-wrap;
}

.portal-ticket-meta-card {
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.portal-ticket-meta-card div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

.portal-ticket-meta-card dd {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.portal-conversation-item {
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.portal-conversation-body {
  line-height: 1.55;
  white-space: pre-wrap;
}

.portal-reply-card textarea {
  box-sizing: border-box;
  display: block;
  margin-top: 0.35rem;
  min-height: 150px;
  resize: vertical;
  width: 100%;
}

.portal-reply-card .portal-card-heading-row {
  margin-bottom: 0.5rem;
}

.portal-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.portal-form-actions-stacked {
  align-items: flex-start;
  flex-direction: column;
}

.portal-empty-state-compact {
  padding: 1rem;
  text-align: left;
}

.portal-empty-state-compact p {
  margin: 0.35rem 0 0;
}

.portal-attachment-link {
  background: #fff;
  color: inherit;
  display: grid;
  gap: 0.2rem;
}

.portal-attachment-link small {
  color: #5b6475;
}

.portal-attachment-card input[type="file"] {
  margin-top: 0.35rem;
  width: 100%;
}

@media (max-width: 900px) {
  .portal-request-hero-status {
    align-items: flex-start;
    justify-items: start;
    min-width: 0;
  }
}


/* Requester asset reporting polish */
.portal-asset-card-actionable {
  border-color: #d7deea;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.portal-asset-card-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.portal-asset-card-header h3 {
  margin-bottom: 0.25rem;
}

.portal-asset-card-header p {
  color: #5b6475;
  margin: 0;
}

.portal-asset-status-pill {
  background: #eef2f7;
  border: 1px solid #d7deea;
  border-radius: 999px;
  color: #334155;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
}

.portal-asset-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-asset-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-selected-asset-summary {
  background: #f8fafc;
  border: 1px solid #d7deea;
  border-radius: 12px;
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
}

.portal-selected-asset-summary strong {
  color: #111827;
}

.portal-selected-asset-summary span#selectedAssetText {
  color: #334155;
}

.portal-small-link {
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.portal-small-link:hover,
.portal-small-link:focus {
  text-decoration: underline;
}

.portal-linked-asset-name,
.portal-linked-asset-detail {
  display: block;
}

.portal-linked-asset-name {
  font-weight: 700;
}

.portal-linked-asset-detail {
  color: #5b6475;
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 0.18rem;
}

@media (max-width: 760px) {
  .portal-asset-card-header {
    display: grid;
  }

  .portal-asset-meta-grid {
    grid-template-columns: 1fr;
  }
}

.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.stacked-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.import-result {
  margin-top: 1rem;
}

.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.import-summary p {
  background: #f8fafc;
  border: 1px solid #d7deea;
  border-radius: 10px;
  margin: 0;
  padding: 0.6rem 0.8rem;
}

.muted-card {
  opacity: 0.82;
}

.section-heading-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading-row h2 {
  margin-bottom: 0.25rem;
}

.compact-button-row {
  margin: 0;
}

.button-link {
  background: #2563eb;
  border-radius: 8px;
  color: #ffffff;
  display: inline-block;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}

.button-link:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.inline-import-panel {
  background: #f8fafc;
  border: 1px solid #d7deea;
  border-radius: 12px;
  margin: 1rem 0;
  padding: 1rem;
}

.inline-import-panel[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .section-heading-row {
    align-items: stretch;
    display: grid;
  }

  .compact-button-row {
    justify-content: flex-start;
  }
}


.form-status.error,
#loginMessage.error {
  color: #b42318;
  font-weight: 600;
}

.form-status.success,
#loginMessage.success {
  color: #067647;
  font-weight: 600;
}

.asset-remote-actions-placeholder p {
  color: var(--text-muted, #475569);
  line-height: 1.5;
  margin-bottom: 0;
}

.inline-lookup-control {
  width: 100%;
  margin-top: -4px;
  margin-bottom: 4px;
}

.inline-lookup-field-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.inline-lookup-field-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.inline-lookup-toggle {
  flex: 0 0 42px;
  min-width: 42px;
  padding: 7px 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.inline-lookup-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
}

.inline-lookup-panel.hidden {
  display: none;
}

.inline-lookup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-lookup-feedback {
  min-height: 1rem;
  font-size: 0.875rem;
}

.inline-lookup-feedback.is-error {
  color: #b91c1c;
}

.inline-lookup-feedback.is-success {
  color: #166534;
}



.ticket-task-display {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.ticket-task-edit-form {
  display: grid;
  gap: 0.55rem;
  width: 100%;
}

.ticket-task-edit-form.hidden,
.ticket-task-display.hidden {
  display: none;
}

.ticket-task-edit-form label {
  margin: 0;
}

.ticket-task-edit-form input,
.ticket-task-edit-form textarea,
.ticket-task-edit-form select {
  width: 100%;
}

.ticket-task-edit-grid {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
}

.ticket-task-edit-required {
  align-self: center;
  white-space: nowrap;
}

.ticket-task-status-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.ticket-task-status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.ticket-task-status-skipped {
  background: #e5e7eb;
  color: #374151;
}

.ticket-task-move-up-button,
.ticket-task-move-down-button {
  min-width: 2rem;
  font-weight: 700;
}

.ticket-task-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 760px) {
  .ticket-task-display {
    flex-direction: column;
  }

  .ticket-task-actions {
    justify-content: flex-start;
  }

  .ticket-task-edit-grid {
    grid-template-columns: 1fr;
  }
}


/* Ticket detail action lanes */
.ticket-action-columns {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.ticket-action-columns-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-action-columns-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-action-column {
  min-width: 0;
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 9px;
  padding: 0.65rem;
  background: var(--card-background, #fff);
}

.ticket-action-column-heading {
  margin-bottom: 0.55rem;
}

.ticket-action-column-heading h4 {
  margin: 0 0 0.1rem;
  font-size: 0.92rem;
}

.ticket-action-list {
  display: grid;
  gap: 0.45rem;
  max-height: 15rem;
  overflow-y: auto;
}

.ticket-action-run-button {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 8px;
  background: var(--subtle-background, #f8fafc);
  color: inherit;
}

.ticket-action-run-button:hover:not(:disabled) {
  border-color: var(--primary-color, #2563eb);
  background: var(--card-background, #fff);
}

.ticket-action-run-title {
  font-weight: 700;
}

.ticket-action-run-detail {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.75;
}

.ticket-action-running {
  opacity: 0.7;
}

.workflow-quick-item {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 8px;
  background: var(--subtle-background, #f8fafc);
}

.workflow-quick-item-copy {
  min-width: 0;
}

.workflow-quick-item-copy strong {
  display: block;
  overflow-wrap: anywhere;
}

.workflow-quick-badges {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.workflow-quick-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.workflow-quick-required {
  background: #fff3cd;
  color: #7a4d00;
}

.workflow-quick-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.workflow-quick-complete-button {
  flex: 0 0 auto;
  padding: 0.38rem 0.55rem;
}

.ticket-workflow-management-drawer {
  padding: 0;
}

.ticket-workflow-management-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  font-weight: 700;
}

.ticket-workflow-management-drawer[open] > .ticket-workflow-management-summary {
  border-bottom: 1px solid var(--border-color, #d8dee9);
}

.ticket-workflow-management-drawer > :not(summary) {
  margin-left: 0.75rem;
  margin-right: 0.75rem;
}

.ticket-workflow-management-drawer > :last-child {
  margin-bottom: 0.75rem;
}

@media (max-width: 1050px) {
  .ticket-action-columns-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-workflow-action-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .ticket-action-columns-two,
  .ticket-action-columns-three {
    grid-template-columns: 1fr;
  }

  .ticket-workflow-action-column {
    grid-column: auto;
  }
}


/* Collapsible ticket action menus */
.ticket-action-dropdown {
  padding: 0;
  overflow: visible;
}

.ticket-action-dropdown-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ticket-action-dropdown-summary::-webkit-details-marker {
  display: none;
}

.ticket-action-dropdown-summary::after {
  content: "▾";
  flex: 0 0 auto;
  font-size: 0.85rem;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.ticket-action-dropdown[open] > .ticket-action-dropdown-summary::after {
  transform: rotate(180deg);
}

.ticket-action-dropdown-summary > span:first-child {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.ticket-action-dropdown-summary strong {
  font-size: 0.92rem;
}

.ticket-action-dropdown-summary small {
  color: var(--muted-text-color, #64748b);
  font-size: 0.72rem;
  font-weight: 400;
}

.ticket-action-count {
  margin-left: auto;
  border-radius: 999px;
  min-width: 1.45rem;
  padding: 0.12rem 0.42rem;
  background: var(--subtle-background, #f1f5f9);
  color: var(--muted-text-color, #475569);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.ticket-action-dropdown[open] > .ticket-action-dropdown-summary {
  border-bottom: 1px solid var(--border-color, #d8dee9);
}

.ticket-action-dropdown > .ticket-action-list {
  margin: 0;
  max-height: 16rem;
  padding: 0.55rem;
}

.ticket-action-add-button {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px dashed var(--primary-color, #2563eb);
  border-radius: 8px;
  background: transparent;
  color: var(--primary-color, #2563eb);
  font-weight: 700;
  text-align: left;
}

.ticket-action-add-button:hover:not(:disabled) {
  background: var(--subtle-background, #f8fafc);
}

.ticket-action-empty-message {
  margin: 0.15rem 0.2rem 0.05rem;
}

@media (max-width: 1050px) {
  .ticket-action-columns-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ticket-workflow-action-column {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .ticket-action-columns-three {
    grid-template-columns: 1fr;
  }
}


/* Ticket action management drawers */
.ticket-action-management-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.ticket-action-management-row > details {
  background: var(--card-background, #fff);
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 0.5rem;
  margin: 0;
  min-width: 0;
}

.ticket-action-management-row .my-quick-action-panel {
  border-top: 0;
  margin-top: 0;
  padding: 0;
}

.ticket-action-management-row .my-quick-action-panel > summary,
.ticket-action-management-row .ticket-workflow-management-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0.75rem;
}

.ticket-action-management-row .my-quick-action-panel > summary {
  list-style: none;
}

.ticket-action-management-row .my-quick-action-panel > summary::-webkit-details-marker {
  display: none;
}

.ticket-action-management-row .my-quick-action-panel > summary::after,
.ticket-action-management-row .ticket-workflow-management-summary::after {
  content: "▾";
  font-size: 0.85rem;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.ticket-action-management-row details[open] > summary::after {
  transform: rotate(180deg);
}

.ticket-action-management-row details[open] > summary {
  border-bottom: 1px solid var(--border-color, #d8dee9);
}

.ticket-action-management-row .my-quick-action-panel > :not(summary) {
  margin-left: 0.75rem;
  margin-right: 0.75rem;
}

.ticket-action-management-row .my-quick-action-panel > :last-child {
  margin-bottom: 0.75rem;
}

.work-update-support-row {
  grid-template-columns: 1fr;
}

@media (max-width: 860px) {
  .ticket-action-management-row {
    grid-template-columns: 1fr;
  }
}
