/* tQuadra Tickets: service desk style on tQTheme/Bootstrap 5 (resource «Ticket UX CSS», installed offline).
   Enterprise shell after the Fondital theme: dark sidebar, light top bar, cards, datatable2 lists, status pills.
   Smarty compiles this file: every opening brace is followed by a space, and comments contain no braces. */

/* Tokens: an installation overrides them in its own stylesheet. */
:root {
  --tq-primary: #2563eb;
  --tq-primary-2: #1d4ed8;
  --tq-primary-soft: #eff6ff;
  --tq-primary-border: #bfdbfe;
  --tq-bg: #f1f5f9;
  --tq-surface: #fff;
  --tq-surface-2: #f8fafc;
  --tq-text: #0f172a;
  --tq-text-body: #334155;
  --tq-muted: #64748b;
  --tq-border: #e2e8f0;
  --tq-border-strong: #cbd5e1;
  --tq-success: #15803d;
  --tq-success-soft: #dcfce7;
  --tq-warning: #b45309;
  --tq-warning-soft: #fef3c7;
  --tq-danger: #b91c1c;
  --tq-danger-soft: #fee2e2;
  --tq-info: #0369a1;
  --tq-info-soft: #e0f2fe;
  --tq-side-from: #0b1222;
  --tq-side-to: #131c2e;
  --tq-side-text: #cbd5e1;
  --tq-side-muted: #94a3b8;
  --tq-side-active: rgba(37, 99, 235, .28);
  --tq-side-accent: #60a5fa;
  --tq-radius: 8px;
  --tq-radius-lg: 12px;
  --tq-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --tq-shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --tq-sidebar-width: 240px;
  --tq-topbar-height: 57px;
  --bs-body-bg: var(--tq-bg);
  --bs-body-color: var(--tq-text-body);
  --bs-border-color: var(--tq-border);
  --bs-link-color: var(--tq-primary);
  --bs-link-hover-color: var(--tq-primary-2);
  --bs-border-radius: var(--tq-radius);
}
body { background: var(--tq-bg); color: var(--tq-text-body); }

/* Buttons: labelled, rounded, one primary per area. The theme stylesheet (Bootstrap) loads after this one: the rules carry
   one more selector than the Bootstrap ones, or its colours, weight and radius win. */
html .btn { --bs-btn-border-radius: var(--tq-radius); --bs-btn-font-weight: 600; }
.btn.btn-primary { --bs-btn-bg: var(--tq-primary); --bs-btn-border-color: var(--tq-primary); --bs-btn-hover-bg: var(--tq-primary-2); --bs-btn-hover-border-color: var(--tq-primary-2); --bs-btn-active-bg: var(--tq-primary-2); --bs-btn-active-border-color: var(--tq-primary-2); }
.btn.btn-outline-primary { --bs-btn-color: var(--tq-primary); --bs-btn-border-color: var(--tq-primary-border); --bs-btn-bg: var(--tq-surface); --bs-btn-hover-color: var(--tq-primary-2); --bs-btn-hover-bg: var(--tq-primary-soft); --bs-btn-hover-border-color: var(--tq-primary); --bs-btn-active-color: var(--tq-primary-2); --bs-btn-active-bg: var(--tq-primary-soft); --bs-btn-active-border-color: var(--tq-primary); }
.btn.btn-outline-secondary { --bs-btn-color: var(--tq-text-body); --bs-btn-border-color: var(--tq-border-strong); --bs-btn-bg: var(--tq-surface); --bs-btn-hover-color: var(--tq-text); --bs-btn-hover-bg: var(--tq-surface-2); --bs-btn-hover-border-color: var(--tq-muted); --bs-btn-active-color: var(--tq-text); --bs-btn-active-bg: var(--tq-border); --bs-btn-active-border-color: var(--tq-muted); }
.btn.btn-outline-warning { --bs-btn-color: var(--tq-warning); --bs-btn-border-color: #fcd34d; --bs-btn-bg: var(--tq-surface); --bs-btn-hover-color: #92400e; --bs-btn-hover-bg: var(--tq-warning-soft); --bs-btn-hover-border-color: #f59e0b; --bs-btn-active-color: #92400e; --bs-btn-active-bg: var(--tq-warning-soft); --bs-btn-active-border-color: #f59e0b; }
.actionItemContainer.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }
.actionItemContainer.btn svg,
.actionItemContainer.btn .zmdi { flex: 0 0 auto; }

/* Top bar: the framework header template, light, logo on the left and user menu on the right. */
#appcontainer > header.container-fluid { flex-grow: 0; }
#appcontainer > header > .navbar { min-height: var(--tq-topbar-height); background: var(--tq-surface) !important; border-bottom: 1px solid var(--tq-border); box-shadow: 0 1px 0 rgba(15, 23, 42, .02); }
#appcontainer > header > .navbar .navbar-brand { margin-right: auto; }
#appcontainer > header > .navbar .navbar-brand img { width: 104px; height: auto; }
#appcontainer > header > .navbar .navbar-collapse { flex-grow: 0; }
#appcontainer > header > .navbar .tq-language-menu.ms-auto { margin-left: 0 !important; }
#appcontainer > header > .navbar .btn-outline-light { --bs-btn-color: var(--tq-text); --bs-btn-border-color: var(--tq-border-strong); --bs-btn-bg: var(--tq-surface); --bs-btn-hover-color: var(--tq-text); --bs-btn-hover-bg: var(--tq-surface-2); --bs-btn-hover-border-color: var(--tq-muted); --bs-btn-active-color: var(--tq-text); --bs-btn-active-bg: var(--tq-surface-2); }
#appcontainer > header > .navbar .nav-link { color: var(--tq-text); }

/* Shell: dark sidebar with the navigation of the role beside the page; the portal pages use the whole width. */
#appcontainer > .container-fluid:has(> .tq-ticket-workspace),
#appcontainer > .container-fluid:has(> .tq-ticket-login) { padding: 0; }
.tq-ticket-workspace { display: grid; grid-template-columns: var(--tq-sidebar-width) minmax(0, 1fr); min-height: calc(100vh - var(--tq-topbar-height)); background: var(--tq-bg); }
.tq-ticket-sidebar { position: sticky; top: var(--tq-topbar-height); align-self: start; height: calc(100vh - var(--tq-topbar-height)); overflow-y: auto; min-width: 0; padding: 18px 12px; background: linear-gradient(180deg, var(--tq-side-from) 0%, var(--tq-side-to) 100%); }
.tq-ticket-sidebar .widget-block.nav { display: block; }
.tq-ticket-sidebar .navbar-nav { display: flex; flex-direction: column; gap: 2px; }
.tq-ticket-sidebar .nav-item > .btn,
.tq-ticket-crm-navigation .nav-item > .btn { display: flex; align-items: center; width: 100%; padding: 9px 12px; color: var(--tq-side-text); font-weight: 500; text-align: left; background: transparent; border: 0; border-radius: var(--tq-radius); }
.tq-ticket-sidebar .nav-item > .btn:hover,
.tq-ticket-sidebar .nav-item > .btn:focus-visible,
.tq-ticket-crm-navigation .nav-item > .btn:hover,
.tq-ticket-crm-navigation .nav-item > .btn:focus-visible { color: #fff; background: rgba(255, 255, 255, .06); }
.tq-ticket-sidebar .nav-item.current > .btn,
.tq-ticket-crm-navigation .nav-item.current > .btn,
.tq-ticket-crm-navigation .nav-item > .btn[href*="/crm-dashboard"] { color: #fff; font-weight: 600; background: var(--tq-side-active); box-shadow: inset 3px 0 var(--tq-side-accent); }
/* CRM pages: the operator navigation, in the colours of the sidebar, above the CRM menu (widget of the area crm_navigation); the
   line of the CRM is current on every CRM page, and from 992px the CRM column scrolls when the two menus exceed the screen. */
.tq-ticket-crm-navigation.navbar-nav { gap: 2px; margin-bottom: 4px; padding: 10px 8px; background: linear-gradient(180deg, var(--tq-side-from) 0%, var(--tq-side-to) 100%); }
.tq-ticket-crm-navigation .nav-item > .btn { padding: 7px 12px; }
/* The sticky CRM column (top: --tq-header-offset of crm-base.css) stays below the fixed top bar, whose height the theme writes
   on #appcontainer (--tq-navbar-height). */
#appcontainer { --tq-header-offset: var(--tq-navbar-height, 0px); }
@media (min-width: 992px) {
  .tq-crm-sidebar > .navbar:has(.tq-ticket-crm-navigation) { max-height: calc(100vh - var(--tq-header-offset)); overflow-y: auto; }
}
.tq-ticket-main { min-width: 0; padding: 24px 28px 40px; }

/* Page header: title and the labelled primary action on one line. */
.tq-ticket-page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tq-ticket-page-title { margin: 0; color: var(--tq-text); font-size: 1.5rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }

/* Cards and their titles; rows of cards are grids, so the cards keep their gaps. */
.tq-ticket-card { min-width: 0; padding: 18px 20px; background: var(--tq-surface); border: 1px solid var(--tq-border); border-radius: var(--tq-radius-lg); box-shadow: var(--tq-shadow); }
.tq-ticket-card-title { margin: 0 0 14px; padding-left: 10px; color: var(--tq-text); font-size: 1rem; font-weight: 700; line-height: 1.3; border-left: 3px solid var(--tq-primary); }
.tq-ticket-card-subtitle { margin: 16px 0 6px; color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tq-ticket-card-subtitle:first-of-type { margin-top: 0; }
.tq-ticket-card-note { margin: -6px 0 12px; color: var(--tq-muted); font-size: .8125rem; }
.tq-ticket-home-lists.row,
.tq-ticket-dashboard-grid.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0; }
.tq-ticket-home-lists.row > .tq-ticket-card,
.tq-ticket-dashboard-grid.row > .tq-ticket-card { width: auto; max-width: none; margin: 0; padding: 18px 20px; }
@media (min-width: 992px) {
  .tq-ticket-home-lists.row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tq-ticket-home-lists.row > .tq-ticket-card:first-child,
  .tq-ticket-home-lists.row > .tq-ticket-card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1600px) {
  .tq-ticket-home-lists.row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .tq-ticket-home-lists.row > .tq-ticket-card:first-child { grid-column: auto; grid-row: span 2; }
}

/* Indicators: one grid of cards (the own workload joins the desk counters on the home). */
.tq-kpi,
.tq-ticket-home-counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tq-ticket-home-counters > .tq-kpi { display: contents; }
.tq-kpi-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; background: var(--tq-surface); border: 1px solid var(--tq-border); border-radius: var(--tq-radius-lg); box-shadow: var(--tq-shadow); }
.tq-kpi-label { color: var(--tq-muted); font-size: .8125rem; font-weight: 600; }
/* A counter card is the link to its tickets: the open button stretches over the card (Bootstrap stretched-link). */
.tq-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tq-kpi-open.btn { padding: 0; line-height: 1; color: var(--tq-muted); }
.tq-kpi-card:has(.tq-kpi-open):hover { border-color: var(--tq-primary); }
/* A state of the open tickets is the link to its tickets in the same way: the whole row. */
.tq-ticket-share-row { position: relative; border-radius: var(--tq-radius); }
.tq-ticket-share-row:has(.tq-kpi-open):hover { background: var(--tq-primary-soft); }
.tq-ticket-share-row:hover .tq-kpi-open,
.tq-kpi-card:hover .tq-kpi-open,
.tq-kpi-open:focus-visible { color: var(--tq-primary); }
.tq-kpi-value { color: var(--tq-text); font-size: 1.75rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tq-kpi-note { color: var(--tq-muted); font-size: .8125rem; }
.tq-kpi-value.text-primary { color: var(--tq-primary) !important; }
.tq-kpi-value.text-success { color: var(--tq-success) !important; }
.tq-kpi-value.text-warning { color: var(--tq-warning) !important; }
.tq-kpi-value.text-danger { color: var(--tq-danger) !important; }

/* Tabs of the queues and of the client's requests. */
.tq-ticket-main .nav-tabs { gap: 4px; margin-bottom: 0; border-bottom: 1px solid var(--tq-border); flex-wrap: nowrap; overflow-x: auto; }
.tq-ticket-main .nav-tabs .nav-link { padding: 10px 14px; color: var(--tq-muted); font-weight: 600; white-space: nowrap; cursor: pointer; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
.tq-ticket-main .nav-tabs .nav-link:hover { color: var(--tq-text); border-bottom-color: var(--tq-border-strong); }
.tq-ticket-main .nav-tabs .nav-link.active { color: var(--tq-primary); background: transparent; border-bottom-color: var(--tq-primary); }
.tq-ticket-main .tab-content { padding: 0; background: transparent; border: 0; }
.tq-ticket-pane { padding-top: 16px; }
.tq-ticket-home > .nav-tabs,
.tq-ticket-home > div > .nav-tabs { background: var(--tq-surface); border: 1px solid var(--tq-border); border-bottom-color: var(--tq-border); border-radius: var(--tq-radius-lg) var(--tq-radius-lg) 0 0; padding: 0 12px; }

/* Search box of the operator queues and bulk bar of the selected tickets. */
.tq-ticket-search { max-width: 560px; margin-bottom: 16px; }
.tq-ticket-search .form-control { background: var(--tq-surface); border-color: var(--tq-border-strong); }
.tq-ticket-search .search-submit.btn { --bs-btn-bg: var(--tq-primary); --bs-btn-border-color: var(--tq-primary); --bs-btn-hover-bg: var(--tq-primary-2); --bs-btn-hover-border-color: var(--tq-primary-2); }
.tq-ticket-search .dropdown-toggle.btn-secondary { --bs-btn-color: var(--tq-text-body); --bs-btn-bg: var(--tq-surface); --bs-btn-border-color: var(--tq-border-strong); --bs-btn-hover-color: var(--tq-text); --bs-btn-hover-bg: var(--tq-surface-2); --bs-btn-hover-border-color: var(--tq-muted); }
.tq-ticket-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; background: var(--tq-primary-soft); border: 1px solid var(--tq-primary-border); border-radius: var(--tq-radius); }

/* datatable2 lists: light header, sort control inside the title, bordered rows, no zebra. Cell borders are inline styles. */
.tq-ticket-main .public_fixedDataTable_main,
.modal .public_fixedDataTable_main { border: 1px solid var(--tq-border) !important; border-radius: var(--tq-radius); background: var(--tq-surface); }
.tq-ticket-main .public_fixedDataTable_header,
.tq-ticket-main .public_fixedDataTable_header .public_fixedDataTableCell_main,
.modal .public_fixedDataTable_header,
.modal .public_fixedDataTable_header .public_fixedDataTableCell_main { background: var(--tq-surface-2) !important; background-image: none !important; }
.tq-ticket-main .public_fixedDataTable_header .public_fixedDataTableCell_main,
.modal .public_fixedDataTable_header .public_fixedDataTableCell_main { border-color: var(--tq-border) !important; }
.tq-ticket-main .public_fixedDataTable_header .public_fixedDataTableCell_cellContent,
.modal .public_fixedDataTable_header .public_fixedDataTableCell_cellContent { padding: 0 6px 0 10px; color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tq-ticket-main .public_fixedDataTableCell_main,
.modal .public_fixedDataTableCell_main { border-color: transparent; }
/* Zebra rows (the table marks the odd ones) and the row under the pointer: the open button of a row stays with its row. */
.tq-ticket-main .public_fixedDataTableRow_main,
.modal .public_fixedDataTableRow_main { background: var(--tq-surface); }
.tq-ticket-main .public_fixedDataTableRow_odd,
.tq-ticket-main .public_fixedDataTableRow_odd .public_fixedDataTableCell_main,
.modal .public_fixedDataTableRow_odd,
.modal .public_fixedDataTableRow_odd .public_fixedDataTableCell_main { background: var(--tq-bg); }
.tq-ticket-main .public_fixedDataTable_bodyRow:hover .public_fixedDataTableCell_main,
.modal .public_fixedDataTable_bodyRow:hover .public_fixedDataTableCell_main { background: #e3edff; }
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1,
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1 { border-bottom-color: var(--tq-border) !important; }
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent,
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent { width: 100%; min-width: 0; padding: 8px 10px; color: var(--tq-text-body); }
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent,
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent { white-space: nowrap; }
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent div:not(.tq-ticket-subject),
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_cellContent div:not(.tq-ticket-subject) { overflow: hidden; text-overflow: ellipsis; }
.public_fixedDataTableCell_cellContent .actionItemContainer + .actionItemContainer { margin-left: 6px; }
/* The cell wrappers are table boxes as wide as their text: blocks inside the flex cell, so long values end with an ellipsis. */
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1.d-flex > .public_fixedDataTableCell_wrap2,
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1.d-flex > .public_fixedDataTableCell_wrap2 { display: block; flex: 1 1 auto; min-width: 0; }
.tq-ticket-main .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1.d-flex .public_fixedDataTableCell_wrap3,
.modal .public_fixedDataTable_bodyRow .public_fixedDataTableCell_wrap1.d-flex .public_fixedDataTableCell_wrap3 { display: block; width: 100%; }
.btn-sort.btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; color: var(--tq-border-strong); font-size: .8rem; background: transparent !important; border: 0; box-shadow: none; }
.btn-sort.btn:hover,
.btn-sort.btn:focus-visible { color: var(--tq-text); background: var(--tq-border) !important; }
.btn-sort.btn-info { color: var(--tq-primary); }
.btn-multiselector.btn { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.datatable-container { min-width: 0; }
.tq-ticket-wrap { white-space: normal; line-height: 1.4; }

/* Native datatable lists of read-only models and plain row lists: header like datatable2, bordered rows. */
.tq-ticket-main .datatable-header-container { margin: 0; padding: 0 4px; background: var(--tq-surface-2); border: 1px solid var(--tq-border); border-radius: var(--tq-radius) var(--tq-radius) 0 0; }
.tq-ticket-main .datatable-header .input-group { flex-wrap: nowrap; align-items: center; }
.tq-ticket-main .datatable-header .textHeaderDataTable { display: block; min-width: 0; overflow: hidden; padding: 10px 0 10px 4px; color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; background: transparent !important; border: 0; }
/* Titles of columns without sorting or search (weekly trend): the same small caps, aligned on the cells of the rows. */
.tq-ticket-main .datatable-header:not(:has(.input-group, .form-floating)) { padding: 10px 4px 10px 12px; color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tq-ticket-main .datatable-header .orderCaretDataTable.btn { width: 24px; height: 24px; padding: 0; margin-left: 4px; color: var(--tq-border-strong); background: transparent; border: 0; }
.tq-ticket-main .datatable-header .orderCaretDataTable.btn:hover { color: var(--tq-text); background: var(--tq-border); }
.tq-ticket-main .datatable-header .form-floating > .form-control { height: 46px; min-height: 46px; padding: 18px 10px 4px; font-size: .875rem; background: var(--tq-surface); border-color: var(--tq-border-strong); border-radius: var(--tq-radius) !important; }
.tq-ticket-main .datatable-header .form-floating > label { padding: 12px 10px; color: var(--tq-muted); font-size: .8125rem; }
.tq-ticket-main .datatable-header .form-floating > .form-control:focus ~ label,
.tq-ticket-main .datatable-header .form-floating > .form-control:not(:placeholder-shown) ~ label { transform: scale(.85) translateY(-.6rem) translateX(.1rem); }
.tq-ticket-list-row,
.tq-kb-row { margin: 0; padding: 10px 4px; background: var(--tq-surface); border-bottom: 1px solid var(--tq-border); }
/* Rows of lists and of the ticket stay inside their box and align with the header: the Bootstrap row, loaded after this
   stylesheet, would pull them out by half a gutter on each side (the vertical gutter is left to Bootstrap). */
.tq-ticket-list-row.row,
.tq-kb-row.row,
.tq-ticket-record-header.row,
.tq-ticket-attachment.row { margin-left: 0; margin-right: 0; }
/* Columns sharing the free width (col-lg) keep it: a long unbroken value ends with an ellipsis, it does not push the others. */
.tq-ticket-list-row > .col,
.tq-ticket-main .datatable-header.col { min-width: 0; }
.tq-ticket-list-row:nth-child(even of .tq-ticket-list-row),
.tq-kb-row:nth-child(even of .tq-kb-row) { background: var(--tq-bg); }
.tq-ticket-list-row:hover,
.tq-kb-row:hover { background: #e3edff; }
.tq-kb-row-title { color: var(--tq-text); font-weight: 600; }
.tq-kb-row-meta > span + span::before { content: "·"; margin-right: .3rem; }

/* Ticket cell: number, subject on one line, client and requester under it. */
.tq-ticket-subject { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .45rem; row-gap: 2px; min-width: 0; width: 100%; }
.tq-ticket-id { flex: 0 0 auto; color: var(--tq-muted); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tq-ticket-subject-title { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--tq-text); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.tq-ticket-subject-meta { display: flex; flex-basis: 100%; gap: .3rem; min-width: 0; overflow: hidden; color: var(--tq-muted); font-size: .8125rem; white-space: nowrap; text-overflow: ellipsis; }
.tq-ticket-assignee { min-width: 0; line-height: 1.35; white-space: nowrap; }
/* Bulk menus (popover of the bulk bar): one entry per line, name and action. */
.tq-ticket-bulk-menu { min-width: 240px; max-height: 360px; overflow-y: auto; }
.tq-ticket-bulk-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 4px 0; border-bottom: 1px solid var(--tq-border); }
.tq-ticket-bulk-item:last-child { border-bottom: 0; }
.tq-ticket-bulk-name { display: inline-flex; gap: .25rem; min-width: 0; overflow: hidden; color: var(--tq-text); white-space: nowrap; text-overflow: ellipsis; }
.tq-ticket-bulk-section { margin: .5rem 0 .25rem; color: var(--tq-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Contract of the client in the ticket view: neutral, red when expired or with the hours used up. */
.tq-contract { display: inline-block; padding: 2px 10px; border: 1px solid var(--tq-border-strong); border-radius: 999px; background: var(--tq-surface); color: var(--tq-text-body); font-size: .78rem; font-weight: 600; line-height: 1.5; }
.tq-contract--none { border-color: var(--tq-border); color: var(--tq-muted); font-weight: 500; }
.tq-contract--warning { border-color: #fca5a5; background: #fef2f2; color: var(--tq-danger); }

/* Operator tags: small neutral chips. */
.tq-ticket-tags { display: inline-flex; gap: .25rem; min-width: 0; overflow: hidden; }
.tq-tag { display: inline-block; padding: 0 6px; border: 1px solid var(--tq-border); border-radius: 4px; background: var(--tq-surface-2); color: var(--tq-text-body); font-size: .72rem; line-height: 1.5; white-space: nowrap; }
/* In the client line of a list the chips take the space left: a long one ends with an ellipsis inside its border. */
.tq-ticket-tags > .tq-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Pills: state by category, priority, SLA badges of the server. */
.tq-status,
.tq-priority { display: inline-flex; align-items: center; gap: .35rem; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.tq-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tq-status--open { color: var(--tq-primary-2); background: #dbeafe; }
.tq-status--waiting { color: #92400e; background: var(--tq-warning-soft); }
.tq-status--closed { color: #475569; background: #e2e8f0; }
.tq-priority { padding: 1px 9px; background: var(--tq-surface); border: 1px solid var(--tq-border-strong); color: var(--tq-text-body); }
.tq-priority--bassa { color: var(--tq-muted); }
.tq-priority--alta { color: var(--tq-warning); border-color: #fcd34d; background: #fffbeb; }
.tq-priority--urgente { color: var(--tq-danger); border-color: #fca5a5; background: #fef2f2; }
.tq-ticket-main .badge,
.modal .tq-ticket-record .badge { padding: .3em .7em; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.tq-ticket-main .badge.text-bg-danger,
.modal .tq-ticket-record .badge.text-bg-danger { color: var(--tq-danger) !important; background: var(--tq-danger-soft) !important; }
.tq-ticket-main .badge.text-bg-warning,
.modal .tq-ticket-record .badge.text-bg-warning { color: #92400e !important; background: var(--tq-warning-soft) !important; }
.tq-ticket-main .badge.text-bg-success,
.modal .tq-ticket-record .badge.text-bg-success { color: var(--tq-success) !important; background: var(--tq-success-soft) !important; }
.tq-ticket-main .badge.text-bg-secondary,
.modal .tq-ticket-record .badge.text-bg-secondary { color: #475569 !important; background: #e2e8f0 !important; }
.tq-ticket-main .badge.text-bg-light,
.modal .tq-ticket-record .badge.text-bg-light { color: var(--tq-text-body) !important; background: var(--tq-surface-2) !important; border: 1px solid var(--tq-border) !important; }

/* Pagination under the lists. */
.tq-ticket-main .pagination,
.modal .pagination { --bs-pagination-color: var(--tq-text-body); --bs-pagination-border-color: var(--tq-border); --bs-pagination-hover-bg: var(--tq-surface-2); --bs-pagination-hover-color: var(--tq-text); --bs-pagination-active-bg: var(--tq-primary); --bs-pagination-active-border-color: var(--tq-primary); --bs-pagination-disabled-color: var(--tq-border-strong); --bs-pagination-border-radius: var(--tq-radius); margin: 12px 0 0; }
/* In the narrow columns of the ticket (articles, incidents) the pages are compact. */
.tq-ticket-panel .pagination { --bs-pagination-padding-x: .55rem; --bs-pagination-padding-y: .2rem; --bs-pagination-font-size: .875rem; }

/* Ticket workspace: header with the actions on one line, properties, conversation with the composer, context. */
.tq-ticket-record { color: var(--tq-text-body); }
.tq-ticket-record-header { position: sticky; top: 0; z-index: 5; margin: 0; padding: 4px 4px 14px; background: var(--tq-surface); border-bottom: 1px solid var(--tq-border); }
.tq-ticket-record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tq-ticket-number { color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tq-ticket-title,
.tq-ticket-title.h4 { margin: 2px 0 0; color: var(--tq-text); font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.tq-ticket-actions { justify-content: flex-end; align-items: center; }
.tq-ticket-actions > div { display: contents; }
.tq-ticket-collision .badge { white-space: normal; text-align: left; }
.tq-ticket-body { margin: 0; min-height: calc(100vh - 170px); }
.tq-ticket-body > .tq-ticket-panel { padding: 16px 18px; background: var(--tq-surface-2); }
.tq-ticket-properties { border-right: 1px solid var(--tq-border); }
.tq-ticket-context { border-left: 1px solid var(--tq-border); }
.tq-ticket-body > .tq-ticket-conversation { display: flex; flex-direction: column; min-width: 0; padding: 16px 20px 0; }
.tq-ticket-fact { margin-bottom: 14px; min-width: 0; color: var(--tq-text); overflow-wrap: anywhere; }
.tq-ticket-fact-label { display: block; margin-bottom: 2px; color: var(--tq-muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
/* Properties in alternate blocks: label, value and its pencil read as one row. */
.tq-ticket-properties .tq-ticket-fact { margin: 0; padding: 8px 10px; border-radius: var(--tq-radius); }
.tq-ticket-properties .tq-ticket-fact:nth-child(odd of .tq-ticket-fact) { background: var(--tq-surface); box-shadow: inset 0 0 0 1px var(--tq-border); }
.tq-ticket-properties .tq-ticket-fact:hover { background: var(--tq-primary-soft); }
.tq-ticket-section { margin-bottom: 20px; min-width: 0; }
.tq-ticket-section-title { margin: 0 0 8px; color: var(--tq-muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tq-ticket-message { margin-bottom: 12px; padding: 14px 16px; background: var(--tq-surface); border: 1px solid var(--tq-border); border-left: 3px solid var(--tq-border-strong); border-radius: var(--tq-radius-lg); }
.tq-ticket-message.tq-ticket-message--response { background: #f8fbff; border-left-color: var(--tq-primary); }
.tq-ticket-message.tq-ticket-message--note { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.tq-ticket-message.tq-ticket-message--side { background: var(--tq-surface-2); border-left-color: var(--tq-primary); border-left-style: dashed; }
.tq-ticket-message-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tq-ticket-message-author { color: var(--tq-text); }
.tq-ticket-message-badge { padding: 1px 8px; color: #92400e; font-size: .72rem; font-weight: 700; background: var(--tq-warning-soft); border-radius: 999px; }
.tq-ticket-message-date { margin-left: auto; color: var(--tq-muted); font-size: .8125rem; white-space: nowrap; }
.tq-ticket-message-subject { margin-top: 6px; color: var(--tq-text); font-weight: 600; }
.tq-ticket-message-text { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.tq-ticket-composer { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 12px 0 14px; background: var(--tq-surface); border-top: 1px solid var(--tq-border); }
.tq-ticket-log { padding: 8px 0; border-bottom: 1px dashed var(--tq-border); font-size: .8125rem; }
.tq-ticket-log:last-child { border-bottom: 0; }
.tq-ticket-log-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--tq-muted); }
.tq-ticket-log-state { color: var(--tq-text); font-weight: 600; }
.tq-ticket-log-note { color: var(--tq-text-body); overflow-wrap: anywhere; }
.tq-ticket-attachment { margin: 0; padding: 6px 0; border-bottom: 1px dashed var(--tq-border); font-size: .875rem; }
.tq-ticket-attachment a { color: var(--tq-primary); text-decoration: none; overflow-wrap: anywhere; }
.tq-ticket-attachment a:hover { text-decoration: underline; }
.tq-kb-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--tq-border); }
.tq-kb-suggestion:last-child { border-bottom: 0; }
.tq-kb-suggestion-text { min-width: 0; }
.tq-kb-suggestion-title { color: var(--tq-text); font-weight: 600; font-size: .875rem; }
/* Incidents linked to a problem: entries like the suggested articles, state and open action under the subject. */
.tq-ticket-incident { padding: 8px 0; border-bottom: 1px dashed var(--tq-border); font-size: .875rem; }
.tq-ticket-incident:last-child { border-bottom: 0; }
.tq-ticket-incident-title { min-width: 0; color: var(--tq-text); font-weight: 600; }

/* Properties edited in place (theme live editor): value with a quiet pencil, save and cancel beside the input. */
.tq-ticket-properties .liveEditButtonParent { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 28px; }
.tq-ticket-properties .liveEditLabel { min-width: 0; overflow-wrap: anywhere; }
.tq-ticket-properties .liveEditLabel:empty::before { content: "—"; color: var(--tq-muted); }
.tq-ticket-properties .liveEditButton.btn { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; color: var(--tq-muted); background: transparent; border: 0; box-shadow: none; }
.tq-ticket-properties .liveEditButton.btn:hover,
.tq-ticket-properties .liveEditButton.btn:focus-visible { color: var(--tq-primary); background: var(--tq-primary-soft); }
.tq-ticket-properties .liveEditSaveButton.btn,
.tq-ticket-properties .liveEditCloseButton.btn { margin: 4px 4px 0 0; }

/* Modals: footer buttons of the framework (close, save) in the portal palette. */
.modal-footer .btn-secondary { --bs-btn-color: var(--tq-text-body); --bs-btn-bg: var(--tq-surface); --bs-btn-border-color: var(--tq-border-strong); --bs-btn-hover-color: var(--tq-text); --bs-btn-hover-bg: var(--tq-surface-2); --bs-btn-hover-border-color: var(--tq-muted); }
.modal-footer .btn-success { --bs-btn-bg: var(--tq-primary); --bs-btn-border-color: var(--tq-primary); --bs-btn-hover-bg: var(--tq-primary-2); --bs-btn-hover-border-color: var(--tq-primary-2); --bs-btn-active-bg: var(--tq-primary-2); }
.modal .modal-content { border: 0; border-radius: var(--tq-radius-lg); box-shadow: var(--tq-shadow-lg); }
.modal-header .modal-title { color: var(--tq-text); font-weight: 700; }

/* Forms in the modals: new request, management, answers, rules, articles. */
.tq-ticket-form .form-control,
.tq-ticket-form .form-select { border-color: var(--tq-border-strong); border-radius: var(--tq-radius); }
.tq-ticket-form .form-control:focus,
.tq-ticket-form .form-select:focus { border-color: var(--tq-primary); box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.tq-ticket-form textarea.form-control { min-height: 160px; }
/* Searchable selects (react-select) as high as the inputs beside them (58 px: the line of the floating fields is 1.25), same border. */
.tq-ticket-form .tqselect__control { border-color: var(--tq-border-strong); border-radius: var(--tq-radius); }
.tq-ticket-form .tqselect__control--is-focused { border-color: var(--tq-primary); box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.tq-ticket-form .tqselect__value-container { line-height: 1.25; }
/* A checkbox beside the fields (rule «Attiva») sits on their middle line. */
.tq-ticket-form .form-check { display: flex; align-items: center; gap: .5rem; min-height: calc(3.5rem + 2px); }
.tq-ticket-form h2 { color: var(--tq-text); font-weight: 700; }

/* Dashboard: distribution bars (5% steps) and weekly trend. */
.tq-ticket-share-row { font-size: .875rem; }
.tq-ticket-share-row > .col:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tq-share { height: .5rem; background: var(--tq-border); border-radius: 999px; }
.tq-share .progress-bar { background: var(--tq-primary); border-radius: 999px; }
.tq-ticket-trend-cell .progress { margin-top: 4px; }
.tq-w-0 { width: 0%; } .tq-w-5 { width: 5%; } .tq-w-10 { width: 10%; } .tq-w-15 { width: 15%; } .tq-w-20 { width: 20%; }
.tq-w-25 { width: 25%; } .tq-w-30 { width: 30%; } .tq-w-35 { width: 35%; } .tq-w-40 { width: 40%; } .tq-w-45 { width: 45%; }
.tq-w-50 { width: 50%; } .tq-w-55 { width: 55%; } .tq-w-60 { width: 60%; } .tq-w-65 { width: 65%; } .tq-w-70 { width: 70%; }
.tq-w-75 { width: 75%; } .tq-w-80 { width: 80%; } .tq-w-85 { width: 85%; } .tq-w-90 { width: 90%; } .tq-w-95 { width: 95%; }
.tq-w-100 { width: 100%; }

/* Knowledge base article. */
.tq-kb-article { max-width: 860px; }
.tq-kb-meta { font-size: .875rem; }

/* Profile and login. */
.tq-ticket-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 24px; }
.tq-ticket-login { min-height: calc(100vh - var(--tq-topbar-height)); display: grid; align-content: center; justify-items: center; padding: 32px 16px; background: var(--tq-bg); }
.tq-ticket-login-layout { width: min(100%, 1040px); margin: 0; }
.tq-ticket-login-intro { min-width: 0; padding: 24px; }
.tq-ticket-login-service { color: var(--tq-text); font-size: 1.75rem; line-height: 1.25; font-weight: 700; }
.tq-ticket-login-introduction { color: var(--tq-muted); line-height: 1.6; max-width: 32rem; }
.tq-ticket-login-panel { width: min(100%, 480px); align-self: center; padding: 32px; background: var(--tq-surface); border: 1px solid var(--tq-border); border-top: 3px solid var(--tq-primary); border-radius: var(--tq-radius-lg); box-shadow: var(--tq-shadow-lg); }
.tq-ticket-login-panel h1 { color: var(--tq-text); font-weight: 700; }
/* The native login box brings its own padding (p-4): inside the panel the fields align with the title. */
.tq-ticket-login-panel .login_form.p-4 { padding: 0 !important; }
.tq-ticket-login-panel .btn-success { --bs-btn-bg: var(--tq-primary); --bs-btn-border-color: var(--tq-primary); --bs-btn-hover-bg: var(--tq-primary-2); --bs-btn-hover-border-color: var(--tq-primary-2); --bs-btn-active-bg: var(--tq-primary-2); min-width: 120px; }
.tq-ticket-person { display: flex; flex-wrap: wrap; column-gap: .3rem; }
.tq-ticket-person > .tq-ticket-subject-meta { flex-basis: 100%; }
.tq-ticket-profile { max-width: 720px; padding: 18px 20px; background: var(--tq-surface); border: 1px solid var(--tq-border); border-radius: var(--tq-radius-lg); box-shadow: var(--tq-shadow); }

/* Tablets and phones: navigation as a scrolling bar above the page, panels of the ticket one under the other. */
@media (max-width: 1199.98px) {
  .tq-ticket-context { border-left: 0; border-top: 1px solid var(--tq-border); }
}
@media (max-width: 991.98px) {
  .tq-ticket-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; }
  .tq-ticket-sidebar { position: static; height: auto; padding: 8px 12px; overflow-x: auto; }
  .tq-ticket-sidebar .navbar-nav { flex-direction: row; gap: 4px; }
  .tq-ticket-sidebar .nav-item > .btn { width: auto; white-space: nowrap; }
  .tq-ticket-sidebar .nav-item.current > .btn { box-shadow: inset 0 -3px var(--tq-side-accent); }
  .tq-ticket-main { padding: 16px; }
  .tq-ticket-properties { border-right: 0; border-bottom: 1px solid var(--tq-border); }
  .tq-ticket-body > .tq-ticket-conversation { order: -1; border-bottom: 1px solid var(--tq-border); }
  .tq-ticket-actions { justify-content: flex-start; flex-wrap: wrap !important; }
  .tq-ticket-body { min-height: 0; }
  .tq-ticket-login-intro { padding: 0 12px; }
  .tq-ticket-login-service { font-size: 1.5rem; }
  .tq-ticket-login-panel { width: 100%; }
}
@media (max-width: 575.98px) {
  .tq-ticket-page-title { font-size: 1.25rem; }
  .tq-ticket-card { padding: 14px; }
  .tq-ticket-record-header { position: static; }
  .tq-ticket-body > .tq-ticket-conversation { padding: 12px 12px 0; }
  .tq-ticket-login { padding: 24px 16px; }
  .tq-ticket-login-panel { padding: 24px 20px; }
}
