/* Scoped to Lista de tickets; calendar, checklist and ticket editing keep their existing behavior. */
#view-lista { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
#view-lista > .card { border: 1px solid #dce4ee !important; border-radius: 12px; background: #fff; }
#view-lista > .card > .card-header { padding: 14px 18px 10px; gap: 12px !important; background: #fff; border-bottom: 0 !important; }
#view-lista .ticket-list-top { display: flex; align-items: center; gap: 18px; width: 100%; flex-wrap: wrap; }
#view-lista .ticket-list-navigation { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
#view-lista .ticket-list-navigation > .fw-bold { color: #193d72; font-size: 18px; font-weight: 600 !important; }
#view-lista .ticket-list-navigation > .fw-bold { display: inline-flex; align-items: center; white-space: nowrap; }
#view-lista #tickets-view-toggle-group { display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap !important; flex: 0 0 auto; width: auto !important; gap: 4px !important; padding: 3px; border: 1px solid #cedbee; border-radius: 9px; background: #f3f6fb; }
#view-lista #tickets-view-toggle-group .btn { width: auto !important; flex: 0 0 auto !important; white-space: nowrap; margin-left: 0 !important; border-radius: 6px !important; border-color: transparent; padding: 8px 12px; font-size: 12px; min-height: 36px; box-shadow: none !important; }
#view-lista #tickets-view-toggle-group .btn-primary { background: #2456ad; color: #fff; }
#view-lista #tickets-view-toggle-group .btn-outline-primary { color: #284d82; background: transparent; }
#view-lista #tickets-view-toggle-group .btn-outline-primary:hover { background: #e4ecf8; }
#view-lista #tickets-view-toggle-group .btn:focus-visible { outline: 2px solid #2456ad; outline-offset: 1px; }
#view-lista .ticket-list-utilities { flex-shrink: 0; }
#view-lista .ticket-list-utilities .btn { font-size: 12px; font-weight: 600; padding: 7px 10px; white-space: nowrap; }
#view-lista .ticket-list-navigation > .fw-bold i { font-size: 21px; }
#view-lista #tickets-legend { display: flex; align-items: center; flex: 1; gap: 8px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; flex-wrap: wrap; }
#view-lista #tickets-legend[hidden] { display: none !important; }
#view-lista #tickets-legend .ea-chip { padding: 5px 9px; font-size: 11px; font-weight: 650; border-width: 1px; box-shadow: none; white-space: nowrap; }
#view-lista #tickets-legend .ea-dot { width: 7px; height: 7px; box-shadow: none; }
#view-lista #tickets-legend .ea-card-subtitle { font-size: 11px; color: #52627a; }
#view-lista #tickets-legend .ea-card-subtitle { display: inline-flex; align-items: center; gap: 4px; }
#view-lista #tickets-legend .ea-card-subtitle i { font-size: 14px; }
#view-lista #tickets-total { color: #193d72 !important; font-size: 13px; white-space: nowrap; }
#view-lista .ticket-list-controls { width: 100%; gap: 8px !important; }
#view-lista .tickets-search-stack { display: flex; flex-direction: row; gap: 8px; flex: 1 1 620px; min-width: 0; }
#view-lista .tickets-search-stack > .input-group { width: auto !important; flex: 1 1 0 !important; min-width: 170px; max-width: none; }
#view-lista .ticket-list-controls .btn { font-size: 12px; font-weight: 600; padding: 7px 10px; }
#view-lista .ticket-list-navigation .btn { font-size: 12px; padding: 7px 10px; }
#view-lista .ticket-list-controls .form-control { font-size: 12px; min-height: 36px; }
#view-lista .ticket-list-controls .form-check { margin-left: 0 !important; }
#view-lista .ticket-list-controls .form-check { padding-left: 0; gap: 6px; }
#view-lista .ticket-list-controls .form-check-input { margin-left: 0 !important; flex-shrink: 0; }
#view-lista .ticket-list-controls .form-check-label { margin-left: 0 !important; }
#view-lista .ticket-list-controls .form-check-label { color: #253e61; font-weight: 600; font-size: 12px; }
#view-lista > .card > .card-body { padding: 4px 18px 16px; background: #fff; }
#view-lista .tickets-table-shell { border: 1px solid #d6e0ee; border-radius: 9px; box-shadow: none; }
#view-lista #tickets-scroll { max-height: var(--ticket-list-height, 65vh); }
#view-lista #tabela-tickets thead.tickets-thead-sticky,
#view-lista #tabela-tickets thead.tickets-thead-sticky tr,
#view-lista #tabela-tickets thead.tickets-thead-sticky th { background: #2563eb !important; color: #fff; }
#view-lista #tabela-tickets thead th { font-family: inherit; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 10px 8px !important; border-color: #2563eb !important; }
#view-lista #tabela-tickets thead th > div { flex-direction: row !important; justify-content: center; gap: 6px !important; }
#view-lista #tabela-tickets thead th > div, #view-lista #tabela-tickets thead th > div div { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 600; }
#view-lista #tabela-tickets thead th > div div { white-space: nowrap; }
#view-lista #tabela-tickets thead th i { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 5px; background: #ffffff26; color: #fff !important; opacity: 1; font-size: 15px; margin: 0; }
#view-lista #tabela-tickets { table-layout: fixed; }
#view-lista #tabela-tickets th, #view-lista #tabela-tickets td { min-width: 0; max-width: none; overflow-wrap: anywhere; }
#view-lista #tabela-tickets tbody td { color: #23364e; font-size: 13px; padding: 6px 8px; border-bottom-color: #edf1f6; }
#view-lista #tabela-tickets .ticket-title-text { font-weight: 500; line-height: 1.4; }
#view-lista #tabela-tickets th:nth-child(1), #view-lista #tabela-tickets td:nth-child(1) { width: 2%; }
#view-lista #tabela-tickets th:nth-child(2), #view-lista #tabela-tickets td:nth-child(2) { width: 7%; }
#view-lista #tabela-tickets th:nth-child(3), #view-lista #tabela-tickets td:nth-child(3) { width: 19%; }
#view-lista #tabela-tickets th:nth-child(4), #view-lista #tabela-tickets td:nth-child(4) { width: 7%; }
#view-lista #tabela-tickets th:nth-child(5), #view-lista #tabela-tickets td:nth-child(5) { width: 7%; }
#view-lista #tabela-tickets th:nth-child(6), #view-lista #tabela-tickets td:nth-child(6) { width: 11%; }
#view-lista #tabela-tickets th:nth-child(7), #view-lista #tabela-tickets td:nth-child(7) { width: 6%; }
#view-lista #tabela-tickets th:nth-child(8), #view-lista #tabela-tickets td:nth-child(8) { width: 9%; }
#view-lista #tabela-tickets th:nth-child(9), #view-lista #tabela-tickets td:nth-child(9) { width: 12%; }
#view-lista #tabela-tickets th:nth-child(10), #view-lista #tabela-tickets td:nth-child(10) { width: 10%; }
#view-lista #tabela-tickets th:nth-child(11), #view-lista #tabela-tickets td:nth-child(11) { width: 10%; }
#view-lista #tabela-tickets .protocolo-prefixo { font-size: 11px; }
#view-lista #tabela-tickets .protocolo-sufixo { font-size: 14px; font-weight: 700; }
#view-lista .ticket-protocol-open { border: 0; padding: 2px 4px; border-radius: 4px; background: transparent; color: #1d4ed8; cursor: pointer; white-space: nowrap; overflow-wrap: normal; }
#view-lista .ticket-protocol-open:hover { background: #e3ecf8; text-decoration: underline; }
#view-lista .ticket-protocol-open:focus-visible { outline: 2px solid #2456ad; outline-offset: 2px; }
#view-lista #tabela-tickets .badge, #view-lista #tabela-tickets .badge-status, #view-lista #tabela-tickets .badge-prioridade { font-size: 11px; }
#view-lista #tabela-tickets .badge-prioridade { padding: 4px 6px; gap: 4px; white-space: nowrap; }
#view-lista #tabela-tickets .badge-prioridade span { overflow-wrap: normal; word-break: normal; }
#view-lista #tabela-tickets .badge-prioridade i { margin-right: 0 !important; }
#view-lista #tabela-tickets .prio-baixa { color: #047857; border-color: #34d399; background: #d1fae5; }
#view-lista #tabela-tickets .prio-media { color: #075985; border-color: #38bdf8; background: #e0f2fe; }
#view-lista #tabela-tickets .prio-alta { color: #92400e; border-color: #f59e0b; background: #fef3c7; }
#view-lista #tabela-tickets .prio-critica { color: #be123c; border-color: #fb7185; background: #ffe4e6; }
#view-lista #tabela-tickets .actions-row-bottom { display: grid; grid-template-columns: repeat(3, 30px); gap: 4px; width: max-content; margin: 0 auto; }
#view-lista #tabela-tickets .btn-action { --action-color: #2563eb; --action-tint: #dbeafe; width: 30px; height: 26px; padding: 0; border: 1px solid var(--action-color); border-radius: 8px; background: #fff; color: var(--action-color); }
#view-lista #tabela-tickets .btn-action i { font-size: 15px; -webkit-text-stroke: .25px; }
#view-lista #tabela-tickets .td-actions { padding: 8px 8px !important; }
#view-lista #tabela-tickets .btn-action-assumir { --action-color: #059669; --action-tint: #d1fae5; }
#view-lista #tabela-tickets .btn-action-ver { --action-color: #2563eb; --action-tint: #dbeafe; }
#view-lista #tabela-tickets .btn-action-historico { --action-color: #c66a06; --action-tint: #fef3c7; }
#view-lista #tabela-tickets .btn-action-evento { --action-color: #db2777; --action-tint: #fce7f3; }
#view-lista #tabela-tickets .btn-action-encaminhar-detalhes { --action-color: #0891b2; --action-tint: #cffafe; }
#view-lista #tabela-tickets .btn-action-problema { --action-color: #7c3aed; --action-tint: #ede9fe; }
#view-lista #tabela-tickets .btn-action-excluir { --action-color: #e11d48; --action-tint: #ffe4e6; grid-column: 2; }
#view-lista #tabela-tickets .btn-action:hover { background: var(--action-tint); color: var(--action-color); border-color: var(--action-color); }
#view-lista #tabela-tickets .btn-action:focus-visible { outline-color: var(--action-color); }
#view-lista .ticket-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#view-lista .ticket-status-update { width: 100%; max-width: 160px; }
#view-lista .ticket-status-update .select-status { width: 100%; height: 28px; min-height: 28px; font-size: 12px; padding: 3px 24px 3px 7px; border-radius: 5px; border-color: #d6e0ed; background-position: right 7px center; background-size: 12px 10px; box-shadow: none; }
#view-lista .ticket-mobile-status:empty { display: none; }
#view-lista #tabela-tickets .badge-status { font-weight: 600; padding: 4px 7px; letter-spacing: .02em; }
#view-lista #tabela-tickets .status-aberto { color: #fff; background: #374151; border-color: #374151; }
#view-lista #tabela-tickets .badge-status, #view-lista #tabela-tickets .badge-farol, #view-lista #tabela-tickets .badge-prioridade { border-radius: 8px; }
#view-lista #tabela-tickets .status-em_atendimento { color: #fff; background: #2563eb; border-color: #2563eb; }
#view-lista #tabela-tickets .status-aguardando { color: #fff; background: #d13f2a; border-color: #d13f2a; }
#view-lista #tabela-tickets .status-suspenso { color: #fff; background: #7c3aed; border-color: #7c3aed; }
#view-lista #tabela-tickets .status-concluido { color: #fff; background: #087f5b; border-color: #087f5b; }
#view-lista #tabela-tickets .status-cancelado { color: #fff; background: #be123c; border-color: #be123c; }
#view-lista #tabela-tickets .badge-status i { font-size: 12px; }
/* Immediate feedback: no animated scaling, shimmer, shadows or moving icons. */
#view-lista .btn, #view-lista .btn i, #view-lista .badge, #view-lista .badge i,
#view-lista .badge-status, #view-lista .badge-status i, #view-lista .badge-prioridade, #view-lista .badge-prioridade i,
#view-lista .ticket-protocol-open, #view-lista .ticket-hub-status,
#view-lista .table tbody tr, #view-lista .table tbody td {
  transition: none !important; animation: none !important; transform: none !important;
  filter: none !important; box-shadow: none !important;
}
#view-lista .btn::before { display: none !important; }
#view-lista .card, #view-lista .card:hover { transition: none !important; transform: none !important; box-shadow: none !important; }
#view-lista .btn:focus-visible { outline: 2px solid #2456ad; outline-offset: 2px; }
#view-lista #tabela-tickets tbody tr > td { background-color: #fff; }
#view-lista #tabela-tickets tbody tr:nth-of-type(odd) > td { background-color: #f4f9ff; }
#view-lista #tabela-tickets tbody tr:hover { background: #eaf4ff; }
#view-lista #tabela-tickets tbody tr:hover > td { --bs-table-accent-bg: #eaf4ff; background-color: #eaf4ff; }
#view-lista #tabela-tickets tbody tr.row-selected > td { --bs-table-accent-bg: #e2edfc; background-color: #e2edfc; }
#view-lista .td-nf > .badge { max-width: 145px; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
#view-lista .ticket-hub-status { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 5px auto 0; padding: 4px 6px; border: 1px solid #d8e2ee; border-radius: 5px; background: #f3f6fb; color: #506078; font-family: inherit; font-size: 10px; font-weight: 650; line-height: 1.3; }
#view-lista button.ticket-hub-status:hover { box-shadow: 0 0 0 2px #d9e6f8; }
#view-lista button.ticket-hub-status:focus-visible { outline: 2px solid #245ead; outline-offset: 2px; }
#view-lista .ticket-hub-status.linked { background: #edf7f1; color: #216445; border-color: #b9dcc9; }
#view-lista .ticket-hub-status.unlinked { color: #52637a; background: #f4f6f9; border-color: #d8e1ed; }
#view-lista .ticket-hub-status.unknown { color: #8a4545; background: #fff1f1; border-color: #eacaca; }
/* Priority is edited on demand inside the ticket, without adding controls per row. */
#modal-ticket .status-aberto { background: #374151; color: #fff; border-color: #374151; }
#modal-ticket .badge-status, #modal-ticket .badge-prioridade, #modal-ticket .badge-farol { border-radius: 8px; }
#modal-ticket .ticket-header-badges { flex-direction: column; align-items: flex-start; }
#modal-ticket .ticket-priority-trigger { border: 0; background: transparent; padding: 0; border-radius: 8px; cursor: pointer; }
#modal-ticket .ticket-priority-trigger .badge-prioridade { gap: 6px; }
#modal-ticket .ticket-priority-trigger:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
#modal-ticket .ticket-priority-trigger .badge-prioridade, #modal-ticket .ticket-priority-trigger i { transition: none; transform: none; box-shadow: none; }
#modal-ticket .ticket-priority-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
#modal-ticket .ticket-priority-editor[hidden] { display: none; }
#modal-ticket .ticket-priority-editor label { font-size: 13px; font-weight: 600; color: #334155; }
#modal-ticket .ticket-priority-editor .form-select { width: 130px; min-height: 32px; font-size: 13px; }
#modal-ticket .ticket-priority-editor .btn { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; transition: none; transform: none; box-shadow: none; }
#modal-ticket .ticket-priority-error { flex-basis: 100%; margin: 0; color: #b91c1c; font-size: 13px; }
/* One legend at the top; task controls stay together below the ticket table. */
#view-lista .ticket-list-checklist-legend { flex: 1; gap: 8px !important; }
#view-lista .ticket-list-checklist-legend[hidden] { display: none !important; }
#view-lista .ticket-list-checklist-legend .ea-chip { padding: 5px 9px; font-size: 11px; font-weight: 650; border-width: 1px; box-shadow: none; white-space: nowrap; }
#view-lista .ticket-list-checklist-legend .ea-dot { width: 7px; height: 7px; box-shadow: none; }
#view-lista #tickets-checklist-card { border: 1px solid #d6e0ee; border-radius: 9px; box-shadow: none !important; overflow: hidden; }
#view-lista #tickets-checklist-card > .card-header { padding: 12px 14px; border-bottom: 1px solid #e2e8f1; }
#view-lista .ticket-task-toolbar { width: 100%; min-width: 0; gap: 12px !important; }
#view-lista .ticket-task-heading { gap: 10px !important; color: #193d72; font-size: 13px; }
#view-lista #tickets-checklist-total { font-size: 12px; text-align: left; max-width: none; }
#view-lista .tickets-checklist-actions { width: auto; flex: 1 1 auto; justify-content: flex-end; gap: 12px !important; }
#view-lista .tickets-checklist-filter-pair { flex: 0 1 340px; max-width: 340px; }
#view-lista .tickets-checklist-filter-pair .form-select { min-width: 140px; min-height: 35px; font-size: 12px; }
#view-lista .tickets-checklist-buttons { margin-left: 0; }
#view-lista .tickets-checklist-buttons .btn { font-size: 12px; font-weight: 600; min-height: 35px; padding: 6px 10px; }
#view-lista .checklist-refresh-btn { min-width: 0; }
#view-lista #tickets-checklist-card > .card-body { padding: 12px 14px; }
#view-lista #tickets-checklist-table thead th { background: #19477f !important; color: #fff; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 700; font-size: 12px; text-transform: none; padding: 10px; }
#view-lista #tickets-checklist-empty { margin: 0 !important; color: #52627a !important; font-size: 13px; }
#view-lista #tickets-checklist-card .card-body:has(#tickets-checklist-empty:not(.d-none)) .tickets-checklist-scroll { display: none; }
#view-lista.ticket-list-checklist-only #tickets-view-checklist { margin-top: 0 !important; }
@media (max-width: 1400px) {
  #view-lista #tabela-tickets thead th { font-size: 12px; padding: 12px 6px !important; }
  #view-lista #tabela-tickets thead th > div { gap: 4px !important; }
  #view-lista #tabela-tickets thead th i { font-size: 14px; }
  #view-lista #tabela-tickets tbody td { padding: 8px 6px; }
  #view-lista #tabela-tickets td:nth-child(9) .badge-status { display: inline-block; white-space: normal; overflow-wrap: normal; line-height: 1.25; padding: 4px 6px; }
  #view-lista #tabela-tickets .btn-action { height: 26px; }
  #view-lista .ticket-list-top { gap: 10px; }
  #view-lista .ticket-list-navigation { gap: 10px; }
  #view-lista #tickets-legend .ea-card-subtitle span { display: none; }
  #view-lista .ticket-list-utilities .btn { font-size: 0; padding: 8px 10px; }
  #view-lista .ticket-list-utilities .btn i { font-size: 16px; }
}
@media (max-width: 767px) {
  #view-lista #tabela-tickets tbody td { font-size: 12px; padding: 8px 4px; }
  #view-lista #tabela-tickets th:nth-child(1), #view-lista #tabela-tickets td:nth-child(1) { width: 24px; }
  #view-lista #tabela-tickets th:nth-child(2), #view-lista #tabela-tickets td:nth-child(2) { width: 78px; }
  #view-lista #tabela-tickets th:nth-child(3), #view-lista #tabela-tickets td:nth-child(3) { min-width: 0; width: auto; }
  #view-lista #tabela-tickets th:nth-child(8), #view-lista #tabela-tickets td:nth-child(8) { min-width: 70px; width: 70px; }
  #view-lista #tabela-tickets th:nth-child(11), #view-lista #tabela-tickets td:nth-child(11) { min-width: 104px; width: 104px; max-width: 104px; }
  #view-lista #tabela-tickets .badge-farol { max-width: 100%; font-size: 9px; padding: 4px; gap: 2px; white-space: normal; line-height: 1.3; }
  #view-lista #tabela-tickets .badge-farol i { margin-right: 0 !important; font-size: 10px; }
  #view-lista #tabela-tickets .select-status { min-width: 0; font-size: 10px; padding: 4px 17px 4px 4px; background-position: right 4px center; background-size: 10px 8px; }
  #view-lista #tabela-tickets .actions-row-bottom { grid-template-columns: repeat(3, 26px); gap: 3px; }
  #view-lista #tabela-tickets .btn-action { width: 26px; height: 26px; }
  #view-lista #tabela-tickets .btn-action i { font-size: 14px; }
}
@media (max-width: 900px) {
  #view-lista .ticket-list-checklist-legend { flex-basis: 100%; }
  #view-lista .tickets-checklist-actions { flex-basis: 100%; justify-content: space-between; }
  #view-lista #tickets-legend { flex-basis: 100%; }
  #view-lista .ticket-list-controls > .tickets-search-stack { flex-basis: 100%; }
  #view-lista .ticket-list-controls > .btn-group { flex-wrap: wrap; }
  #view-lista .ticket-list-controls > .ms-auto { margin-left: 0 !important; flex-wrap: wrap; }
  #view-lista > .card > .card-header { padding: 12px; }
  #view-lista > .card > .card-body { padding: 0 12px 12px; }
}
@media (max-width: 540px) {
  #view-lista .tickets-checklist-filter-pair { flex: 1 1 100%; flex-direction: row; width: 100%; max-width: none; }
  #view-lista .tickets-checklist-filter-pair .form-select { min-width: 0; width: 50%; flex: 1 1 0; }
  #view-lista .tickets-checklist-buttons { width: 100%; justify-content: flex-end; }
  #view-lista .ticket-list-navigation { width: 100%; justify-content: space-between; }
  #view-lista .ticket-list-navigation > .fw-bold { font-size: 16px; }
  #view-lista .ticket-list-navigation .btn { padding: 7px; font-size: 10px; }
  #view-lista #tickets-view-toggle-group .btn { padding: 7px; font-size: 10px; min-height: 32px; }
  #view-lista .ticket-list-top { gap: 8px; }
  #view-lista .ticket-list-utilities { margin-left: auto; }
  #view-lista #tickets-legend { flex-basis: auto; min-width: 0; }
  #view-lista #tickets-total { font-size: 12px; }
  #view-lista .ticket-list-controls > .btn-group { flex-direction: row !important; width: auto !important; gap: 0 !important; }
  #view-lista .ticket-list-controls > .btn-group .btn { width: auto !important; font-size: 10px; padding: 6px; min-width: 0; }
  #view-lista .ticket-list-controls > .btn-group .btn i { font-size: 12px; }
  #view-lista .ticket-list-controls > .tickets-search-stack { order: 0; }
  #view-lista .ticket-list-controls > .form-check { order: 1; }
  #view-lista #btn-toggle-filtros { order: 2; margin-left: auto; }
  #view-lista .ticket-list-controls > .btn-group { order: 3; }
  #view-lista #tabela-tickets thead th { padding: 10px 4px !important; font-size: 10px; }
  #view-lista #tabela-tickets thead th > div { flex-direction: column !important; gap: 3px !important; }
  #view-lista #tabela-tickets thead th > div div { white-space: nowrap; }
  #view-lista .tickets-search-stack { flex-direction: column; }
  #view-lista .tickets-search-stack > .input-group { flex: auto !important; width: 100% !important; min-width: 0; }
  #view-lista #tickets-total { margin-left: 0 !important; flex-basis: 100%; }
}
