:root {
    --panel-w: min(60vw, 1180px); /* width of the ticket opened beside the list; the divider changes it */
    --ink: #1c2733;
    --muted: #66758a;
    --line: #e3e8ee;
    --page: #f4f6f9;
    --side: #152a45;
    --accent: #1d6fd6;
}
html { font-size: 15px; }
body { background: var(--page); color: var(--ink); }
a { color: var(--accent); }
.icon { vertical-align: -3px; flex: none; }
.text-secondary { color: var(--muted) !important; }
.btn-primary { background: var(--accent); border-color: var(--accent); }

/* ---- frame: sidebar, top bar, content ---- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 216px; background: var(--side); color: #fff; display: flex; flex-direction: column; z-index: 1040; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: .5rem .6rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: rgba(255, 255, 255, .78); text-decoration: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.side-heading { margin: 1rem .7rem .3rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.app .main { margin-left: 216px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .6rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
.top-search { position: relative; flex: 1; max-width: 34rem; margin-right: auto; }
.top-search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top-search .form-control { padding-left: 2.2rem; background: var(--page); border-color: transparent; }
.top-search .form-control:focus { background: #fff; border-color: var(--accent); }
.content { padding: 1.5rem; }
.content-inner { max-width: 1500px; }
.plain .content-inner { max-width: none; }
.sidebar-backdrop { display: none; }
/* Desktop: the menu button folds the side menu down to its icons (and back), remembered in this browser */
@media (min-width: 992px) {
    .sidebar, .app .main { transition: width .18s, margin-left .18s; }
    .nav-collapsed .sidebar { width: 64px; overflow-x: hidden; }
    .nav-collapsed .app .main { margin-left: 64px; }
    .nav-collapsed .brand { padding-left: 15px; padding-right: 0; }
    .nav-collapsed .brand > span:not(.brand-mark), .nav-collapsed .side-nav a > span { display: none; }
    .nav-collapsed .side-nav { padding-left: 10px; padding-right: 10px; }
    .nav-collapsed .side-nav a { justify-content: center; padding-left: 0; padding-right: 0; }
    .nav-collapsed .side-heading { font-size: 0; height: 1px; margin: .8rem .4rem; background: rgba(255, 255, 255, .18); }
}
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .sidebar-open .sidebar { transform: none; }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1030; }
    .app .main { margin-left: 0; }
    .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
}

/* Desktop: the page never grows into one long scroll. The side menu, top bar and announcement banner stay in place
   and only the content area scrolls; a list page ("fill") keeps its title and filters fixed and scrolls the list itself. */
@media (min-width: 992px) {
    .app .main { height: 100vh; min-height: 0; display: flex; flex-direction: column; }
    .app .topbar, .app .announce-bar { flex: none; }
    .app .content { flex: 1; min-height: 0; overflow-y: auto; }
    .app .content.fill { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }
    .app .content.fill .content-inner { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
    .app .content.fill .content-inner > * { flex: none; }
    .app .content.fill .content-inner > .fill-frame { flex: 1 1 auto; min-height: 12rem; display: flex; flex-direction: column; overflow: hidden; }
    .fill-frame > form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .fill-frame .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
    .app .content.fill .pager { margin-top: .75rem !important; }
    /* Admin > Settings: the open section scrolls inside the card, its Save button stays visible */
    .settings-body { flex: 1; min-height: 0; }
    .settings-body > * { max-height: 100%; }
    .settings-panes { display: flex; flex-direction: column; min-height: 0; }
    .settings-panes > .tab-pane.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .settings-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .settings-form > .settings-scroll { flex: 1; min-height: 0; overflow-y: auto; }
}
.settings-nav .nav-link { white-space: nowrap; }

/* list on the left, the one being edited on the right (Users, Clients) */
.split-frame { display: flex; flex-direction: column; gap: 1rem; }
.split-list thead.sticky-top th { background: var(--bs-body-bg); }
@media (min-width: 992px) {
    .app .content.fill .content-inner > .split-frame { flex: 1 1 auto; min-height: 12rem; flex-direction: row; align-items: stretch; }
    .split-frame > .split-list { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
    .split-frame > .split-list > .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
    .split-frame > .split-panel { flex: 0 0 26rem; display: flex; flex-direction: column; overflow: hidden; }
    .split-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .split-form > .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
}

/* Lists inside cards scroll within the card instead of stretching the page. */
.mini-list { max-height: 22rem; overflow-y: auto; }
.card > .table-responsive { max-height: 60vh; overflow-y: auto; }
.card > .table-responsive thead th { position: sticky; top: 0; z-index: 1; background: #fff; box-shadow: inset 0 -1px 0 var(--line); }
.scroll-frame { max-height: 26rem; overflow-y: auto; }
.card .timeline { max-height: 24rem; overflow-y: auto; padding-left: 2px; }

/* ---- shared pieces ---- */
.card { border-color: var(--line); border-radius: 10px; }
.page-title { font-size: 1.45rem; font-weight: 600; margin: 0; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 600; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.ticket-number { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { font-weight: 600; }
.badge.status-New { background: #1d6fd6; }
.badge.status-Open { background: #b25e09; }
.badge.status-Pending { background: #6b4fbb; }
.badge.status-Resolved { background: #1f7a4d; }
.badge.status-Closed { background: #5b6672; }
.badge.status-Merged { background: #7a5c99; }
.badge.priority-Low { background: #e9ecef; color: #495057; }
.badge.priority-Normal { background: #e7f0fb; color: #1d4f91; }
.badge.priority-High { background: #fde8cf; color: #8a4500; }
.badge.priority-Urgent { background: #f9d6d5; color: #931c18; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; }
.dot.status-New { background: #1d6fd6; } .dot.status-Open { background: #d97a12; } .dot.status-Pending { background: #6b4fbb; }
.dot.status-Resolved { background: #1f7a4d; } .dot.status-Closed { background: #8a94a0; } .dot.status-Merged { background: #a08bb8; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.empty .icon { color: #b6c0cc; margin-bottom: .5rem; }
.toast-holder { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; }
.toast-note { background: #1c2733; color: #fff; padding: .6rem .9rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); font-size: .9rem; }
.toast-note.bad { background: #a12622; }

/* ---- dashboard ---- */
.stat { display: block; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); height: 100%; transition: box-shadow .15s, border-color .15s; }
.stat:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(29, 111, 214, .12); color: var(--ink); }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 2rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.attention .value { color: #b3261e; }
.mini-list a { display: flex; gap: .7rem; align-items: center; padding: .6rem 1rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.mini-list a:first-child { border-top: 0; }
.mini-list a:hover { background: #f7f9fc; }
.mini-list .subject { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .grow { min-width: 0; flex: 1; }
.status-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e9edf2; }
.status-bar span { display: block; }
.status-bar .status-New { background: #1d6fd6; } .status-bar .status-Open { background: #d97a12; } .status-bar .status-Pending { background: #6b4fbb; }

/* ---- ticket list ---- */
.view-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.view-tabs a { padding: .35rem .8rem; border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.view-tabs a:hover { border-color: var(--accent); }
.view-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.view-tabs .count { margin-left: .35rem; font-size: .8rem; opacity: .75; font-variant-numeric: tabular-nums; }
.filters .form-select { width: auto; min-width: 8.5rem; }
.ticket-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-top: 1px solid var(--line); cursor: pointer; }
.ticket-row:first-child { border-top: 0; }
.ticket-row:hover { background: #f7f9fc; }
.ticket-row.selected { background: #eef5ff; }
.ticket-row .grow { min-width: 0; flex: 1; }
.ticket-row .subject { font-weight: 500; color: var(--ink); text-decoration: none; }
.ticket-row.is-new .subject { font-weight: 700; }
.ticket-row .subject:hover { text-decoration: underline; }
.ticket-row .preview, .ticket-row .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row .preview { color: var(--muted); }
.ticket-row .meta { color: var(--muted); font-size: .85rem; }
.ticket-row .quick { display: flex; flex-direction: column; gap: .3rem; width: 11rem; flex: none; }
.ticket-row .quick-line { display: flex; gap: .3rem; }
.quick-select { border: 1px solid transparent; background-color: transparent; border-radius: 6px; padding: .12rem 1.4rem .12rem .45rem; font-size: .85rem; width: 100%; color: var(--ink); cursor: pointer;
    appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2366758a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .35rem center; background-size: 11px; }
.ticket-row:hover .quick-select, .quick-select:focus { border-color: #cfd6de; background-color: #fff; }
.quick-select.status-New { color: #1d5fb8; font-weight: 600; } .quick-select.status-Open { color: #9a5208; font-weight: 600; }
.quick-select.status-Pending { color: #5a3fa8; font-weight: 600; } .quick-select.status-Resolved { color: #1a6a43; font-weight: 600; } .quick-select.status-Closed { color: #5b6672; font-weight: 600; }
.quick-select.priority-High { color: #8a4500; font-weight: 600; } .quick-select.priority-Urgent { color: #b3261e; font-weight: 700; }
.bulk-bar { display: none; align-items: center; flex-wrap: wrap; gap: .6rem; padding: .6rem 1rem; background: #eef5ff; border-bottom: 1px solid #cfe0f7; border-radius: 10px 10px 0 0; }
.bulk-bar.show { display: flex; }
.bulk-bar .form-select { width: auto; }
@media (max-width: 767.98px) { .ticket-row .quick { display: none; } }
/* the list shows as much as its own width allows: a wider list (menu folded, divider moved) brings back the preview and quick changes */
#ticket-list { container-type: inline-size; }
@container (max-width: 34rem) { .ticket-row .preview { display: none; } }
@container (max-width: 44rem) { .ticket-row .quick { display: none; } }

/* ---- ticket panel beside the list ---- */
.panel-resizer { display: none; }
.ticket-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(60vw, 1180px); display: none; flex-direction: column; background: var(--page);
    border-left: 1px solid var(--line); box-shadow: -10px 0 28px rgba(21, 42, 69, .10); z-index: 1035; }
body.panel-open .ticket-panel { display: flex; }
.panel-bar { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.panel-body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.panel-body.loading { opacity: .5; pointer-events: none; }
.ticket-row.active { background: #e4efff; box-shadow: inset 3px 0 0 var(--accent); }
@media (min-width: 1200px) {
    /* the list stays usable next to the panel: it keeps its space and drops what does not fit */
    body.panel-open .main { margin-right: var(--panel-w); }
    body.panel-open .filters, body.panel-open .top-search + .btn span { display: none !important; }
    .ticket-panel { width: var(--panel-w); }
    /* the divider between the list and the ticket can be dragged; the ticket keeps at least half the screen */
    .panel-resizer { display: block; position: absolute; top: 0; bottom: 0; left: -5px; width: 10px; cursor: col-resize; z-index: 2; touch-action: none; }
    .panel-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s; }
    .panel-resizer:hover::after, .panel-resizer:focus-visible::after, body.panel-resizing .panel-resizer::after { background: var(--accent); }
    .panel-resizer:focus { outline: none; }
    body.panel-resizing { cursor: col-resize; user-select: none; }
    body.panel-resizing .main, body.panel-resizing .sidebar { transition: none; }
    body.panel-open .content { padding-right: 1rem; }
}
@media (max-width: 1199.98px) {
    /* phone and tablet: the ticket takes the whole screen; "Tickets" or the Back button returns to the list */
    .ticket-panel { width: 100vw; z-index: 1050; box-shadow: none; }
    .panel-body { padding: 1rem; }
    body.panel-open { overflow: hidden; }
}

/* ---- ticket page ---- */
.message { display: flex; gap: .9rem; margin-bottom: 1rem; }
.message .card { flex: 1; min-width: 0; }
.message .card-header { background: #fff; border-bottom-color: var(--line); }
.message-frame { width: 100%; border: 0; display: block; min-height: 3rem; }
.attachment-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.attachment-chips a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fafbfc; max-width: 100%; }
.attachment-chips a:hover { border-color: var(--accent); background: #fff; }
.attachment-chips .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-card h2 { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.meta-list dt { font-weight: 500; color: var(--muted); font-size: .82rem; }
.meta-list dd { margin-bottom: .7rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.3rem; border-left: 2px solid var(--line); margin-left: .35rem; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #9fb0c3; }
.timeline .when { color: var(--muted); font-size: .82rem; }

.sign-in { max-width: 24rem; margin: 9vh auto 0; }
.sign-in .brand { color: var(--ink); justify-content: center; padding-top: 0; }
.sign-in-or { display: flex; align-items: center; gap: .75rem; }
.sign-in-or::before, .sign-in-or::after { content: ""; flex: 1; border-top: 1px solid var(--bs-border-color, #dee2e6); }

/* ---- AI agents, groups, follow-ups ---- */
.pre-line { white-space: pre-line; }
.badge.review-badge { background: #fff1c2; color: #7a5200; border: 1px solid #f1d37a; }
.ai-card { border-color: #d9d2f5; }
.ai-card h2 { color: #5a3fa8; }
.ai-section { padding-top: .75rem; margin-top: .75rem; border-top: 1px solid var(--line); }
.ai-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ai-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ai-facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin-bottom: .5rem; font-size: .92rem; }
.ai-facts dt { font-weight: 500; color: var(--muted); }
.ai-facts dd { margin: 0; }
.ai-note { padding: .5rem .7rem; border-radius: 8px; background: #f2f5f9; font-size: .9rem; }
.ai-note.warn { background: #fff8e1; color: #6b4a00; }
.ai-note.bad { background: #fdecea; color: #8c1d18; }
.resolve-menu { width: 22rem; max-width: 90vw; }
.stat.warn .value { color: #9a6700; }
.stat.ok .value { color: #1f7a4d; }
.queue-table td, .queue-table th { white-space: nowrap; }

/* ---- announcements ---- */
.announce-bar { display: flex; flex-direction: column; gap: 1px; }
.announce { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.5rem; background: #fdecea; color: #7a1c17; text-decoration: none; font-size: .92rem; }
.announce:hover { color: #7a1c17; background: #fbdedb; }
.announce.status-Monitoring { background: #fff6dc; color: #6b4a00; }
.announce.status-Restored { background: #e3f4ea; color: #155b37; }
.announce .what { font-weight: 600; white-space: nowrap; }
.announce .latest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.badge.ann-Investigating { background: #b3261e; } .badge.ann-Identified { background: #c2410c; }
.badge.ann-Monitoring { background: #9a6700; } .badge.ann-Restored { background: #1f7a4d; }
@media (max-width: 991.98px) { .announce { padding: .5rem 1rem; } }
.sign-in-news { display: flex; flex-direction: column; gap: .5rem; max-height: 40vh; overflow-y: auto; }
.sign-in-news .announce { align-items: flex-start; border-radius: .5rem; padding: .65rem .85rem; }
.sign-in-news .announce > svg { flex: none; margin-top: .2rem; }
.sign-in-news .what { white-space: normal; }
.min-w-0 { min-width: 0; }

/* helpers from newer Bootstrap versions that the bundled 5.1 does not have */
.text-bg-success { background: #1f7a4d !important; color: #fff !important; }
.text-bg-secondary { background: #5b6672 !important; color: #fff !important; }
.text-bg-danger { background: #b3261e !important; color: #fff !important; }
.text-bg-light { background: #f4f6f9 !important; color: #1c2733 !important; }
.rounded-end-0 { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.border-warning-subtle { border-color: #f1d37a !important; }
.text-warning-emphasis { color: #9a6700 !important; }
.card-note { flex: none; }
@media (min-width: 1200px) {
    /* with a ticket open beside the list, the views stay on one line and slide sideways */
    body.panel-open #view-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: thin; }
}

/* ---- AI usage chart ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #8a5cc8; --series-5: #c2477d; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .9rem; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--ink); }
.chart-frame { position: relative; }
.usage-chart { display: block; width: 100%; height: auto; overflow: visible; }
.usage-chart .grid { stroke: #edf0f4; stroke-width: 1; }
.usage-chart .axis { stroke: #c5ced8; stroke-width: 1; }
.usage-chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.usage-chart .hit { fill: transparent; }
.usage-chart .bucket { outline: none; cursor: default; }
.usage-chart .bucket.on .hit, .usage-chart .bucket:focus .hit { fill: rgba(29, 111, 214, .06); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(21, 42, 69, .14);
    padding: .45rem .65rem; font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.agent-setup { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem .2rem; margin-bottom: .8rem; }
.agent-setup legend { float: none; width: 100%; font-size: .95rem; font-weight: 600; margin-bottom: .4rem; padding: 0; }
.role-text { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.list-group-item.active-role { background: #eef5ff; }

/* ---- private notes and the Ticket Analyzer ---- */
.note-list { display: flex; flex-direction: column; gap: .6rem; }
.note { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem; padding: .6rem .75rem; background: #fffdf5; }
.note-ai { background: #f5f8ff; }
.note-superseded { opacity: .65; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.note-correct > summary { list-style: none; }
.note-correct > summary::-webkit-details-marker { display: none; }
.note-correct[open] { flex-basis: 100%; }
.skill-diff { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.skill-diff .changed { background: #fff6d6; }
@media (max-width: 767.98px) { .skill-diff { grid-template-columns: 1fr; } }
@media (min-width: 992px) {
    .split-frame.wide-panel > .split-list { flex: 0 0 22rem; }
    .split-frame.wide-panel > .split-panel { flex: 1 1 auto; min-width: 0; }
}

/* ---- replies emailed to the requester */
.message-outgoing .card { border-color: #b9dcc6; }
.message-outgoing .card-header { background: #eef8f1; }
.reply-card > summary { cursor: pointer; list-style: none; }
.reply-card > summary::-webkit-details-marker { display: none; }
.reply-card:not([open]) > summary { border-bottom: 0; border-radius: inherit; }
.reply-card[open] > summary { background: #f4f8fd; }
.reply-fields { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; align-items: center; }
.reply-fields label, .reply-fields > span { margin: 0; }
.reply-fields input[readonly] { background: var(--bs-light, #f8f9fa); }
.reply-file-list li .text-truncate { max-width: 60%; }
.message-highlight .card { box-shadow: 0 0 0 3px rgba(29, 111, 214, .35); }
/* the emails on a ticket scroll inside their own frame, so a long history never makes the page long */
.conversation { max-height: min(62vh, 44rem); overflow-y: auto; overscroll-behavior: contain; padding: .25rem .5rem .25rem 0; border-radius: .5rem; }
.conversation .message:last-child { margin-bottom: 0; }
