/* Agent and admin pages share compact tables, navigation and dialogs. */
.cc-staff #nav { position: relative; z-index: 200; white-space: normal; }
.cc-staff #nav > li { position: relative; border: 0; border-radius: 7px; background: transparent; }
.cc-staff #nav > li > ul {
    display: none;
    visibility: visible;
    background: var(--cc-panel);
    color: var(--cc-text);
    border: 1px solid var(--cc-edge);
    border-radius: 8px;
    padding: 8px;
    min-width: 220px;
    top: 100%;
    left: 0;
    box-shadow: 0 12px 24px #0006;
}
.cc-staff #nav > li:hover > ul, .cc-staff #nav > li:focus-within > ul { display: block; }
.cc-staff #nav > li { background: transparent !important; box-shadow: none; }
.cc-staff #nav > li > ul { top: calc(100% + 8px); }
.cc-staff #nav > li > ul::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }
.cc-staff #nav > li > ul li { display: block; }
.cc-staff #nav > li > ul a { width: 100%; justify-content: flex-start; }
.cc-staff #sub_nav { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.cc-staff #sub_nav > li { list-style: none; border: 0; }
.cc-staff #sub_nav > li > a { display: block; background: none; border: 0; padding: 8px 12px; border-radius: 6px; color: var(--cc-text); }
.cc-staff #sub_nav > li > a.active, .cc-staff #sub_nav > li > a:hover { background: var(--cc-raised); color: var(--cc-accent); }
.cc-staff #customQ_nav .customQ-dropdown { background: var(--cc-panel); border-color: var(--cc-edge); }
.cc-staff #customQ_nav, .cc-staff #customQ_nav #sub_nav { min-width: 0; width: 100%; }
.cc-staff #customQ_nav { height: auto; border-bottom: 1px solid var(--cc-edge); }
.cc-staff #customQ_nav #sub_nav { position: relative; inset: auto; height: auto !important; align-items: center; margin: 0; padding: 10px 36px 10px 0; border: 0; }
.cc-staff #customQ_nav #sub_nav > li { margin: 0; padding: 0; border: 0; }
.cc-staff #customQ_nav #sub_nav > li > a { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 12px; margin: 0; background-image: none; }
.cc-staff #customQ_nav .jb-overflowmenu-container { top: 10px; bottom: auto; border: 0; background: transparent; }
.cc-staff #customQ_nav .jb-overflowmenu-menu-secondary-handle { border: 0; background: var(--cc-raised); color: var(--cc-text); border-radius: 6px; }
.cc-staff #customQ_nav .jb-overflowmenu-menu-secondary { background: var(--cc-panel); border-color: var(--cc-edge); }
.cc-staff #customQ_nav .jb-overflowmenu-menu-secondary li.item { border-color: var(--cc-edge); }
.cc-staff #customQ_nav .jb-overflowmenu-menu-secondary li.item > a { color: var(--cc-text); }
.cc-staff #customQ_nav .jb-overflowmenu-menu-secondary li.item:hover { background: var(--cc-raised); }
.cc-staff #customQ_nav .jb-overflowmenu-menu-primary .customQ-dropdown { top: 100%; }
.cc-staff #customQ_nav #sub_nav > li > a > i { float: none; margin: 0; line-height: 1; }
.cc-staff #customQ_nav #sub_nav > li > a > .icon-sort-down::before { content: "\f0d7"; }
.cc-staff #customQ_nav .jb-overflowmenu-menu-primary li.item > a { color: var(--cc-text); }
.cc-staff #customQ_nav .jb-overflowmenu-menu-primary li.item:hover { background: var(--cc-raised); border-color: var(--cc-edge); }
.cc-staff #basic_search { background: var(--cc-panel); border: 0; box-shadow: none; }
.cc-staff #basic_search .attached.input { display: inline-flex; align-items: stretch; width: min(420px, 100%); height: 44px; border: 1px solid var(--cc-edge); border-radius: 7px; overflow: hidden; vertical-align: middle; outline: none; }
.cc-staff #basic_search .attached.input:focus-within { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.cc-staff #basic_search .attached.input input { flex: 1; min-width: 0; min-height: 0; width: 100%; height: 100%; border: 0; border-radius: 0; outline: none; }
.cc-staff #basic_search .attached.input .attached.button { flex: none; height: 100%; min-height: 0; margin: 0; border: 0; border-radius: 0; outline: none; }
.cc-staff #basic_search.cc-ticket-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cc-staff .cc-ticket-search-form { float: none; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: 1; }
.cc-staff .cc-ticket-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: 2; }
.cc-staff .cc-ticket-filters .action-button { margin: 0; }
.cc-staff .cc-search-more { white-space: nowrap; }
.cc-staff .cc-ticket-list-bar .content { width: 100% !important; }
.cc-staff :is(table.list, .settings_table, .form_table) { color: var(--cc-text); background: var(--cc-panel); border-color: var(--cc-edge); }
.cc-staff table.table, .cc-staff table.table td { background: var(--cc-panel); color: var(--cc-text); border-color: var(--cc-edge); }
.cc-staff table.list { border-collapse: collapse; border-radius: 8px; }
.cc-staff table.list :is(thead th, tfoot td) { background: var(--cc-raised); color: var(--cc-white); padding: 12px; border-color: var(--cc-edge); }
.cc-staff table.list thead th a { color: var(--cc-white); background-color: transparent; }
.cc-staff table.list tbody td { background: var(--cc-panel); color: var(--cc-text); border-color: var(--cc-edge); padding: 11px 12px; }
.cc-staff #content table.list tbody td { background: var(--cc-panel); }
/* Keep custom priority colors meaningful; tone down the default pale yellow. */
.cc-staff table.list tbody td[style*="background-color"] { color: #241607; }
.cc-staff table.list tbody :is(td, div)[style*="background-color:#FFFFF0"] { background-color: #3b2c17 !important; color: var(--cc-text); }
.cc-staff :is(form#reply, form#note) { background: var(--cc-panel); border-color: var(--cc-edge); }
.cc-staff .thread-event .description, .cc-staff .thread-event .description a { color: var(--cc-text); }
.cc-staff .thread-event .description :is(b, strong) { color: var(--cc-white); }
.cc-staff .ticket_info.custom-data thead th { background: var(--cc-raised); color: var(--cc-white); border-bottom: 1px solid var(--cc-edge); padding: 12px; width: auto; }
.cc-staff .action-button i.icon-caret-down { border: 0; }
.cc-staff .action-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cc-staff .action-button > i { float: none; margin: 0; line-height: 1; }
.cc-staff .action-button > i.icon-caret-down { order: 2; }
.cc-staff .flush-left { margin-left: 0; }
.cc-staff .flush-right { margin-right: 0; }
.cc-staff .faded-more { color: var(--cc-text); }
.cc-staff .thread-event .type-icon { background: var(--cc-raised); border-color: var(--cc-edge); color: var(--cc-text); }
.cc-staff .thread-event .type-icon::after { border-color: var(--cc-panel); }
.cc-staff #response_options input[type="text"], .cc-staff #response_options textarea:not(.richtext) { background: var(--cc-bg); color: var(--cc-white); border-color: var(--cc-edge); }
.cc-staff :is(.form_table, .settings_table) em, .cc-staff :is(.form-header, .field) .description { color: var(--cc-text); }
.cc-staff :is(.form_table, .settings_table) :is(th, td) { padding: 10px 12px; }
.cc-staff .form_table th em, .cc-staff .form-header { color: var(--cc-white); }
.cc-staff table.list thead th a:is(.asc, .desc) { background-image: none; }
.cc-staff table.list thead th a:is(.asc, .desc)::after { margin-left: 8px; color: var(--cc-accent); }
.cc-staff table.list thead th a.asc::after { content: "▴"; }
.cc-staff table.list thead th a.desc::after { content: "▾"; }
.cc-staff .action-dropdown { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.cc-staff #basic_search.cc-dashboard-filters > div { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cc-staff .cc-dashboard-filters label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.cc-staff .cc-dashboard-filters .button { margin: 0; }
.cc-staff #users-list .sticky.bar .content > .pull-left { float: none; margin-right: auto; }
.cc-staff #users-list .sticky.bar h2 { margin: 0; }
.cc-staff #users-list .sticky.bar .content > .pull-right { float: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-staff #users-list .sticky.bar .action-button { margin: 0; }
.cc-staff table.list tbody :is(tr:hover, tr.highlight) td { background: var(--cc-raised); }
.cc-staff table.list tbody tr.highlight td { box-shadow: inset 3px 0 var(--cc-accent); }
.cc-staff table.list caption { background: transparent; color: var(--cc-text); }
.cc-staff .settings_table th, .cc-staff .form_table th, .cc-staff div.section-break { color: var(--cc-white); background: var(--cc-raised); border-color: var(--cc-edge); }
.cc-staff .settings_table td, .cc-staff .form_table td { color: var(--cc-text); background: transparent; border-color: var(--cc-edge); }
.cc-staff :is(.search, .well, #breadcrumbs, .banner) { background: var(--cc-panel); color: var(--cc-text); border-color: var(--cc-edge); border-radius: 8px; }
.cc-staff #breadcrumbs a { color: var(--cc-accent); }
.cc-staff .search input { max-width: 100%; }
.cc-staff .action-dropdown ul { background: transparent; border-color: var(--cc-edge); }
.cc-staff .action-dropdown li:hover, .cc-staff .action-dropdown li > a:hover { background: var(--cc-raised); color: var(--cc-accent); }
.cc-staff .dialog .body, .cc-staff .dialog .header, .cc-staff .dialog h3 { background: transparent; color: var(--cc-white); border-color: var(--cc-edge); }
.cc-staff .dialog { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
.cc-staff .ui-widget-content, .cc-staff .ui-widget-header { background: var(--cc-panel); color: var(--cc-text); border-color: var(--cc-edge); }
.cc-staff .ui-state-default, .cc-staff .ui-widget-content .ui-state-default { background: var(--cc-raised); color: var(--cc-white); border-color: var(--cc-edge); }
.cc-staff .ui-state-active, .cc-staff .ui-widget-content .ui-state-active { background: var(--cc-accent); color: #241607; }
.cc-staff .tip_content { background: var(--cc-panel); color: var(--cc-text); border-color: var(--cc-edge); }
.cc-staff .tip_content h1 { font-size: 18px; line-height: 1.35; letter-spacing: 0; margin: 0 0 10px; padding-bottom: 10px; border-color: var(--cc-edge); }
.cc-staff :is(.dashboard, #dashboard, .dashboard-stats) { background: transparent; color: var(--cc-text); }
.cc-staff .cc-activity-chart { display: flex; flex-direction: column; padding: 20px; background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: 12px; }
.cc-staff #line-chart-here { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; filter: none; }
.cc-staff #line-chart-here tspan { font-family: Montserrat, Arial, sans-serif; font-size: 11px; }
.cc-staff #line-chart-legend { order: -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cc-staff #line-chart-legend br { display: none; }
.cc-staff #line-chart-legend .label { margin: 0 !important; padding: 5px 10px; border-radius: 5px; color: #241607; font: 600 11px/1.5 Montserrat, Arial, sans-serif; text-shadow: none; }
.cc-staff #line-chart-legend .label.disabled { color: var(--cc-text); }
.cc-staff #content table.dashboard-stats { width: 100%; border-collapse: collapse; border-color: var(--cc-edge); }
.cc-staff #content table.dashboard-stats :is(th, td) { padding: 12px; border-color: var(--cc-edge); color: var(--cc-text); background: var(--cc-panel); }
.cc-staff #content table.dashboard-stats tbody:first-child th { color: var(--cc-white); background: var(--cc-raised); border-bottom-style: solid; }
.cc-staff #content table.dashboard-stats tbody:nth-child(2) th { color: var(--cc-white); }
.cc-staff #content table.dashboard-stats tbody:nth-child(2) tr:hover :is(th, td) { background: var(--cc-raised); }
.cc-staff .cc-table-scroll { width: 100%; overflow-x: auto; border-radius: 8px; }
.cc-staff #loginBox {
    width: min(460px, calc(100% - 32px));
    margin: 8vh auto 28px;
    padding: 28px;
    background: var(--cc-panel);
    border: 1px solid var(--cc-edge);
    border-radius: 12px;
    box-shadow: none;
    position: relative;
    top: auto;
    left: auto;
}
.cc-staff #loginBox::after { display: none; }
.cc-staff #loginBox #logo a { height: auto; }
.cc-staff #loginBox #company .content { position: static; padding: 0; }
.cc-staff #loginBox :is(#blur, #background), .cc-staff #brickwall { display: none; }
.cc-staff #loginBox #logo { width: auto; height: auto; margin: 0 0 24px; text-align: center; }
.cc-staff #loginBox #logo img { width: 90px; height: 84px; max-height: none; }
.cc-staff #loginBox #logo .cc-brand { display: block; margin-top: 10px; }
.cc-staff #loginBox #logo .valign-helper { display: none; }
.cc-staff #loginBox #login-message { color: var(--cc-white); background: transparent; }
.cc-staff #loginBox .banner { padding: 0; background: transparent; border: 0; color: var(--cc-text); }
.cc-staff #loginBox fieldset { border: 0; padding: 0; margin: 20px 0; }
.cc-staff #loginBox #login input:not([type="hidden"]) { width: 100%; margin: 0 0 14px; height: auto; min-height: 44px; background: var(--cc-bg); color: var(--cc-white); border: 1px solid var(--cc-edge); border-radius: 7px; box-shadow: none; }
.cc-staff #loginBox button.submit { float: none; width: 100%; margin-top: 20px; }
.cc-staff #loginBox #reset-link { color: var(--cc-accent); font-size: 12px; }
.cc-staff #loginBox #company { position: static; width: auto; background: transparent; color: var(--cc-text); margin: 24px 0 0; font-size: 11px; }
.cc-staff #poweredBy { position: static; color: var(--cc-text); margin: 20px auto; text-align: center; background: none; border: 0; box-shadow: none; }
@media (max-width: 700px) {
    .cc-staff .cc-ticket-list-bar .content > .pull-right { float: none; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .cc-staff .cc-ticket-list-bar .action-button { margin: 0; }
    .cc-staff .cc-ticket-search-form { flex-basis: 100%; }
    .cc-staff #basic_search.cc-ticket-search .attached.input { width: 100%; }
    .cc-staff .cc-ticket-filters { width: 100%; }
    .cc-staff #tickets .cc-table-scroll { overflow: visible; }
    .cc-staff #content #tickets table.tickets { overflow: visible; border: 0; border-spacing: 0; }
    .cc-staff #tickets table.tickets :is(thead, tbody, tfoot) { display: block; }
    .cc-staff #tickets table.tickets thead tr { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
    .cc-staff #tickets table.tickets thead th { display: block; width: auto; border: 0; border-radius: 6px; padding: 8px; }
    .cc-staff #tickets table.tickets thead th:empty { display: none; }
    .cc-staff #tickets table.tickets tbody tr { position: relative; display: flex; flex-direction: column; margin-bottom: 12px; border: 1px solid var(--cc-edge); border-radius: 8px; padding: 12px; background: var(--cc-panel); }
    .cc-staff #content #tickets table.tickets tbody td { display: flex; align-items: baseline; gap: 12px; width: auto; min-width: 0; border: 0; padding: 6px 0; order: 2; overflow-wrap: anywhere; }
    .cc-staff #tickets table.tickets tbody td[data-label]::before { content: attr(data-label); flex: 0 0 38%; color: var(--cc-text); font-size: 12px; }
    .cc-staff #content #tickets table.tickets tbody td[data-column="number"] { order: 0; padding-right: 32px; }
    .cc-staff #content #tickets table.tickets tbody td[data-column$="subject"] { order: 1; font-size: 16px; padding-bottom: 12px; }
    .cc-staff #tickets table.tickets tbody td:is([data-column="number"], [data-column$="subject"])::before { display: none; }
    .cc-staff #content #tickets table.tickets tbody td.cc-ticket-select { position: absolute; top: 12px; right: 12px; padding: 0; }
    .cc-staff #tickets table.tickets tbody td > div { flex: 1; min-width: 0; width: auto !important; }
    .cc-staff #tickets table.tickets tbody td .truncate { white-space: normal; max-width: 100%; width: auto !important; overflow: visible; text-overflow: clip; }
    .cc-staff #tickets table.tickets tbody .faded-more { color: var(--cc-text); }
    .cc-staff #tickets table.tickets tfoot :is(tr, td) { display: block; width: auto; }
    .cc-staff :is(#reply, #note) table { width: 100%; }
    .cc-staff :is(#reply, #note) table > tbody > tr { display: flex; flex-direction: column; }
    .cc-staff :is(#reply, #note) table > tbody > tr > td { width: 100%; }
    .cc-staff .select2-container { max-width: 100%; }
    .cc-staff #nav > li > ul { left: 0; min-width: 180px; }
    .cc-staff #nav > li:nth-last-child(-n+2) > ul { left: auto; right: 0; }
    .cc-staff #content table.list { display: block; width: 100%; overflow-x: auto; }
    .cc-staff table.two-column { width: 100% !important; }
    .cc-staff table.two-column > tbody > tr { display: flex; flex-direction: column; }
    .cc-staff table.two-column > tbody > tr > td { width: 100%; }
    .cc-staff table.two-column td > div { max-width: 100%; }
    .cc-staff .form_table > tbody > tr:not(.cc-keep-row) { display: flex; flex-direction: column; }
    .cc-staff .form_table > tbody > tr > td { width: 100%; }
    .cc-staff #nav > li > ul { max-width: calc(100vw - 32px); }
    .cc-staff .dialog table { max-width: 100%; }
    .cc-staff .thread-entry.avatar, .cc-staff .thread-entry.message.avatar { margin-left: 0; margin-right: 0; }
    .cc-staff .thread-entry > .avatar { display: none; }
}
