.page-new-design {
  .tickets-panel {
    .list-search-bar-with-toggle {
      display: flex;
      align-items: center;
      flex-basis: auto;
      gap: 16px;
      .list-search-control { flex: 0 0 420px; }
      .list-inline-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--slate-500);
        white-space: nowrap;
      }
    }
    .tickets-table {
      table-layout: fixed;
      tbody > tr > td:nth-child(1),
      tbody > tr > td:nth-child(2) { color: var(--slate-400); }
      th:first-child, td:first-child { width: 44px; }
      th:nth-child(2), td:nth-child(2) { width: calc(19ch + 32px); white-space: nowrap; }
      th:nth-child(3), td:nth-child(3) { width: auto; min-width: 0; }
      td:nth-child(3) { overflow: hidden; color: var(--slate-800); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
      th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5) { width: 81px; white-space: nowrap; }
      tbody > tr > td:nth-child(4) { color: var(--red-500); }
      tbody > tr > td:nth-child(5) { color: var(--sky-700); }
      th:nth-child(6), td:nth-child(6), th:nth-child(7), td:nth-child(7) { width: 81px; white-space: nowrap; }
      th:last-child, td:last-child { width: 90px; padding-right: 8px; padding-left: 8px; }
    }
  }

  .ticket-create-modal .modal {
    width: min(720px, 94vw);
    .form-item {
      grid-template-columns: 112px minmax(0, 1fr);
      > input, > select, > textarea { width: 100%; }
      > select { height: 38px; min-height: 38px; }
    }
  }

  .ticket-detail-overlay {
    .ticket-detail-modal { --ticket-detail-gap: 16px; position: relative; width: min(720px, 94vw); max-height: 90vh; padding: 32px 24px 32px 32px; border: 0; border-radius: 16px; overflow: hidden; }
    .modal-header {
      margin-bottom: 24px;
      h2 { color: var(--slate-800); font-size: 14px; font-weight: 700; }
      .modal-close { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--slate-100); color: var(--slate-500); img { width: 11px; height: 11px; } &:hover { background: var(--slate-200); } }
    }
    .ticket-detail-body {
      max-height: calc(90vh - 150px); margin: 0; padding-right: 8px; overflow-y: auto; gap: var(--ticket-detail-gap);
      .ticket-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ticket-detail-gap); margin-bottom: 0; > div { min-height: 38px; } > div:not(.form-item) { display: flex; align-items: center; gap: 8px; } .ticket-detail-label { flex: 0 0 5rem; color: var(--slate-600); } .form-item { display: flex; align-items: center; gap: 8px; margin: 0; label { flex: 0 0 5rem; color: var(--slate-600); } select { width: calc(100% - 5rem - 8px); height: 38px; min-height: 38px; } } }
      .ticket-detail-section { margin-top: 0; h3 { margin: 0 0 12px; color: var(--slate-800); font-size: 14px; } .form-item { display: flex; align-items: flex-start; gap: 8px; margin: 0; label { flex: 0 0 5rem; padding-top: 10px; color: var(--slate-600); } input, textarea { flex: 1 1 auto; width: auto; min-width: 0; } } input, select, textarea { border: 1px solid var(--color-input-border); border-radius: 8px; } input, select { min-height: 38px; } textarea { padding: 8px 12px; resize: vertical; } }
      .ticket-comments-list { display: flex; flex-direction: column; gap: 8px; }
      .ticket-comments-empty { margin: 0; color: var(--slate-400); }
      .ticket-comment-item { padding: 12px; border: 1px solid var(--slate-200); border-radius: 8px; background: var(--slate-50); }
      .ticket-comment-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 6px; color: var(--slate-500); font-size: 12px; }
      .ticket-comment-body { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; }
      #ticket-comment-body:focus { margin: 2px; outline: var(--input-focus-outline); outline-offset: 0; box-shadow: none; }
    }
    .modal-footer { margin-top: 24px; }
  }

  @media (max-width: 768px) { .ticket-detail-overlay .ticket-detail-modal { padding: 24px; } .ticket-detail-overlay .ticket-detail-body .ticket-detail-meta { grid-template-columns: 1fr; } }
}
