/*
 * The shell, native forms and legacy Bootstrap dialogs use the same
 * AlignUI tokens as the central React support desk.
 */
body {
    --primary-base: #1c1c1c;
    --primary-dark: #000;
    --primary-darker: #111;
    --primary-alpha-10: #1818181a;
    --primary-alpha-16: #18181829;
    --primary-alpha-24: #1818183d;
    --frame-margin: clamp(10px, 1.7vw, 30px);
    display: flow-root;
    min-height: 100vh;
    background: radial-gradient(ellipse at 70% 0, #fff 0, transparent 54%), linear-gradient(135deg, #d5d5d5, #f2f2f2 56%, #dddddd) fixed;
    color: var(--text-strong-950, #0e121b);
    font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
}
[hidden], .hidden { display: none !important; }
a { color: var(--primary-base, #335cff); }
:focus-visible { outline: 2px solid var(--primary-base, #335cff); outline-offset: 3px; }
#app-screen {
    display: grid;
    grid-template-columns: clamp(174px, 16vw, 218px) minmax(0, 1fr);
    grid-template-areas: "sidebar header" "sidebar main";
    grid-template-rows: auto 1fr;
    gap: 8px 16px;
    min-height: calc(100vh - 2 * var(--frame-margin));
    margin: var(--frame-margin);
    padding: 12px;
    border: 1px solid #fff;
    border-radius: 28px;
    background: #ffffff38;
    box-shadow: 0 10px 36px #1111110a;
}
.workspace-sidebar, .workspace-header, .panel, .auth-box, .support-surface {
    background: var(--bg-white-0, #fff);
}
.workspace-sidebar {
    grid-area: sidebar;
    border-radius: 21px;
    background: #fff9;
}
.workspace-brand { display: flex; align-items: center; gap: 8px; padding: 18px 12px; min-height: 68px; white-space: nowrap; }
.workspace-brand strong { font-size: 15px; }
.workspace-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-base, #335cff);
    color: #fff;
    flex: 0 0 auto;
}
.workspace-sidebar nav.collapse { display: block; }
.workspace-links { padding: 8px; }
.workspace-links > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    color: var(--text-sub-600, #525866);
    padding: 9px 10px;
    margin: 3px 0;
    font-weight: 500;
    line-height: 22px;
}
.workspace-links > li.active > a, .workspace-links > li.active > a:hover {
    background: var(--primary-base);
    color: #fff;
    font-weight: 650;
}
#support-unread {
    margin-left: auto;
    border-radius: 6px;
    background: var(--primary-alpha-10, #ebefff);
    color: var(--primary-base, #335cff);
    padding: 0 7px;
    font-size: 11px;
    font-weight: 700;
}
.workspace-links > li.active #support-unread { background: #fff; color: #1c1c1c; }
.workspace-header {
    grid-area: header;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 6px 4px;
    background: transparent;
}
.workspace-header h1 { flex: 1; font-size: clamp(22px, 2.4vw, 34px); font-weight: 590; margin: 0; letter-spacing: -.04em; }
.workspace-header .btn { border-radius: 999px; background: #fff9; border-color: #fff; }
.workspace-header .btn:hover { background: #fff; }
.workspace-menu { display: none; }
.workspace-refresh-label { margin-left: 6px; }
.workspace-account { position: relative; margin: 0 8px 8px; }
.workspace-account summary {
    display: grid;
    justify-items: center;
    gap: 5px;
    cursor: pointer;
    list-style: none;
    border-radius: 14px;
    padding: 10px 8px 8px;
    font-size: 13px;
    font-weight: 550;
}
.workspace-account summary::-webkit-details-marker { display: none; }
.workspace-account summary:hover, .workspace-account[open] summary { background: #ffffffb3; }
.workspace-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ededed, #d0d0d0);
    color: #313131;
    font-size: 18px;
}
.workspace-account-options { color: #565656; font-size: 13px; }
#user-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account > div {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 5px);
    transform: translateX(-50%);
    z-index: 20;
    padding: 6px;
    border-radius: 9px;
    border: 1px solid var(--stroke-soft-200, #e1e4ea);
    background: var(--bg-white-0, #fff);
    box-shadow: 0 6px 16px #0e121b14;
}
@media (min-width: 761px) {
    .workspace-sidebar {
        position: sticky;
        top: calc(var(--frame-margin) + 13px);
        align-self: start;
        display: flex;
        flex-direction: column;
        height: calc(100vh - 2 * var(--frame-margin) - 26px);
        height: calc(100dvh - 2 * var(--frame-margin) - 26px);
    }
    .workspace-sidebar nav.collapse {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
    .workspace-account { margin-top: auto; }
}
.workspace-main { grid-area: main; min-width: 0; padding: 0 2px 2px; }
.management-overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.management-health, .management-latest {
    min-width: 0;
    min-height: 166px;
    padding: 20px 22px;
    border-radius: 21px;
}
.management-health {
    isolation: isolate;
    position: relative;
    overflow: hidden;
    background: #121212;
    color: #fff;
}
.management-health::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: '';
    background:
        linear-gradient(90deg, #121212 18%, #121212b0 54%, transparent 88%),
        repeating-radial-gradient(ellipse at 106% 104%, #151515 0%, #151515 5%, #303030 6%, #616161 6.8%, #282828 8%, #121212 10%);
}
.management-health h2, .management-latest h2 { font-size: 14px; font-weight: 550; margin: 0 0 12px; }
.management-health p { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.management-health p strong { font-size: 38px; line-height: 1.1; font-weight: 550; font-variant-numeric: tabular-nums; }
.management-health p span, .management-health-label { color: #d0d0d0; font-size: 13px; }
.management-meter { width: min(270px, 80%); height: 4px; margin: 12px 0 8px; background: #ffffff36; border-radius: 8px; }
.management-meter span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.management-latest {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #fff;
    background: radial-gradient(ellipse at 100% 0, #e2e2e2, #fff 70%);
}
.management-latest-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #fff; background: #181818; margin-bottom: 10px; }
.management-latest h2 { margin-bottom: 4px; color: #555; }
.management-latest strong { overflow-wrap: anywhere; font-size: 17px; font-weight: 620; }
.management-latest-date { color: #555; font-size: 12px; margin-top: 3px; }
.management-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; }
.management-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 4px; border: 1px solid #fff; border-radius: 22px; background: #ffffff78; }
.management-tabs > li > a { padding: 7px 12px; border-radius: 999px; color: #3d3d3d; }
.management-tabs > li.active > a, .management-tabs > li.active > a:hover { background: #181818; color: #fff; }
.management-search { display: flex; align-items: center; gap: 10px; width: min(240px, 30%); background: #fff9; border: 1px solid #fff; border-radius: 999px; padding: 7px 13px; margin: 0; }
.management-search input { width: 100%; min-width: 0; background: transparent; border: 0; font-weight: 400; }
.management-search:focus-within { outline: 2px solid #222; outline-offset: 2px; }
.management-search input:focus { outline: 0; }
.management-empty { padding: 10px 12px; margin: 0 0 8px; background: #fff; border-radius: 12px; color: #555; }
.management-panes > .tab-pane > .panel { margin: 0; }
.management-panes code { color: #353535; background: #efefef; }
.management-panes #groups-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.management-panes #groups-list > .panel { margin: 0; }

.monitor-dashboard { display: grid; gap: 14px; }
.monitor-overview { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; }
.monitor-card, .monitor-health { min-width: 0; border-radius: 21px; }
.monitor-card { background: #ffffffe0; border: 1px solid #fff; }
.monitor-health, .monitor-numbers, .monitor-grafana { padding: 18px 20px; min-height: 156px; }
.monitor-health {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #121212;
    color: #fff;
}
.monitor-health::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, #121212 19%, #121212b0 56%, transparent 88%),
        repeating-radial-gradient(ellipse at 105% 108%, #141414 0 5%, #313131 6%, #5c5c5c 6.8%, #272727 8%, #121212 10%);
}
.monitor-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: #181818; }
.monitor-health .monitor-icon { color: #171717; background: #f6f6f6; }
.monitor-health h2, .monitor-grafana h2 { margin: 10px 0 4px; font-size: 13px; font-weight: 560; }
.monitor-health h2 { color: #e2e2e2; }
.monitor-health strong { font-size: clamp(17px, 1.67vw, 26px); line-height: 1.16; font-weight: 620; letter-spacing: -.025em; }
.monitor-health time { color: #d6d6d6; margin-top: 8px; font-size: 12px; }
.monitor-numbers { display: grid; align-items: center; padding-inline: 10px; }
.monitor-numbers dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; text-align: center; }
.monitor-numbers dl > div { padding: 4px 1px; }
.monitor-numbers dl > div + div { border-left: 1px solid #e3e3e3; }
.monitor-numbers dt { font-size: clamp(10px, .9vw, 12px); font-weight: 550; color: #525252; }
.monitor-numbers dd { margin: 3px 0 0; font-size: clamp(24px, 2.75vw, 38px); font-weight: 580; line-height: 1.15; font-variant-numeric: tabular-nums; }
.monitor-critical { color: #9c2432; }
.monitor-grafana { background: radial-gradient(ellipse at 100% 0, #e4e4e4, #fff 73%); }
.monitor-grafana h2 { font-size: 16px; font-weight: 650; }
.monitor-grafana p { color: #515151; margin: 0 0 9px; font-size: 13px; }
.monitor-grafana .btn { border-radius: 999px; padding-inline: 13px; font-size: 12px; }
.monitor-grafana .btn span { margin-left: 5px; }
.monitor-streams { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; }
.monitor-has-alerts, .monitor-has-silences { grid-template-columns: minmax(0, 1fr); }
.monitor-section > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 13px 16px; border-bottom: 1px solid #ededed; }
.monitor-section h2 { margin: 0; font-size: 15px; font-weight: 650; }
.monitor-section-meta { color: #5c5c5c; font-size: 12px; }
.monitor-count { display: inline-block; min-width: 1.5rem; border-radius: 999px; padding: 2px 6px; background: #ececec; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.monitor-empty, .monitor-loading { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 14px 16px; color: #4b4b4b; margin: 0; }
.monitor-empty p { margin: 0; }
.monitor-empty-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #eee; color: #454545; }
.monitor-table { padding: 0 10px 8px; }
.monitor-table .table { min-width: 700px; }
.monitor-table .table > tbody > tr > td { vertical-align: top; }
.monitor-signal { min-width: 190px; max-width: 550px; overflow-wrap: anywhere; }
.monitor-signal strong, .monitor-target small { display: block; }
.monitor-signal .label { display: inline-block; margin-bottom: 5px; }
.monitor-signal p, .monitor-target small { margin: 4px 0 0; color: #575757; }
.monitor-target { min-width: 110px; overflow-wrap: anywhere; }
.monitor-date { white-space: nowrap; font-size: 12px; }
.monitor-actions { min-width: 145px; }
.monitor-actions button { border-radius: 999px; margin: 0 4px 4px 0; }
#monitor-error { margin: 0; }

@media (max-width: 1050px) {
    .monitor-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .monitor-health { grid-column: span 2; }
}
@media (max-width: 780px) {
    .monitor-overview, .monitor-streams { grid-template-columns: minmax(0, 1fr); }
    .monitor-health { grid-column: auto; }
    .monitor-table .table { display: block; min-width: 0; }
    .monitor-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .monitor-table tbody { display: block; }
    .monitor-table .table > tbody > tr { display: block; padding: 10px 6px; }
    .monitor-table .table > tbody > tr + tr { border-top: 1px solid #ededed; }
    .monitor-table .table > tbody > tr > td { display: block; min-width: 0; max-width: none; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .monitor-table td:not(:first-child):not(:last-child)::before { content: attr(data-label); display: block; color: #5c5c5c; font-size: 11px; }
    .monitor-actions:empty { display: none !important; }
    .monitor-actions button { white-space: normal; }
}
@media (max-width: 540px) {
    .monitor-overview, .monitor-streams { gap: 8px; }
    .monitor-health, .monitor-numbers, .monitor-grafana { padding: 13px; min-height: auto; }
    .monitor-card, .monitor-health { border-radius: 15px; }
    .monitor-grafana .monitor-icon { float: left; margin-right: 8px; }
    .monitor-grafana h2 { margin-top: 0; }
    .monitor-empty, .monitor-loading { min-height: 64px; }
}
.auth-box {
    max-width: 400px;
    margin: clamp(48px, 15vh, 150px) auto 24px;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--stroke-soft-200, #e1e4ea);
    box-shadow: 0 8px 24px #0e121b0b;
}
.auth-box h1 { font-size: 25px; letter-spacing: -.03em; margin: 20px 0 8px; }
.auth-box p { color: var(--text-sub-600, #525866); margin-bottom: 22px; }
.panel, .support-surface, .modal-content {
    border: 1px solid var(--stroke-soft-200, #e1e4ea);
    border-radius: 19px;
    box-shadow: 0 1px 2px #0e121b08;
}
.panel-default > .panel-heading {
    background: transparent;
    border-color: var(--stroke-soft-200, #e1e4ea);
    color: var(--text-strong-950, #0e121b);
    font-size: 15px;
    font-weight: 650;
    min-height: 52px;
    padding: 14px 16px;
}
.panel-heading .btn { margin-top: -2px; }
.panel-body { padding: 16px; }
.workspace-main .table { margin-bottom: 0; }
.table-responsive { border: 0; margin: 0; overflow-x: auto; }
.table > thead > tr > th, .desk-table th {
    background: var(--bg-weak-50, #f5f7fa);
    color: var(--text-sub-600, #525866);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.table > thead > tr > th, .table > tbody > tr > td {
    border-color: var(--stroke-soft-200, #e1e4ea);
    padding: 10px 12px;
    vertical-align: middle;
}
.table > tbody > tr:hover { background: var(--bg-weak-50, #f5f7fa); }
.btn, .form-control { border-radius: 8px; }
.btn { font-weight: 550; }
.btn-default { color: var(--text-strong-950, #0e121b); border-color: var(--stroke-soft-200, #e1e4ea); }
.btn-default:hover, .btn-default:focus { background: var(--bg-weak-50, #f5f7fa); }
.btn-primary, .btn-success, .btn-primary:focus, .btn-success:focus {
    color: #fff;
    background: var(--primary-base, #335cff);
    border-color: var(--primary-base, #335cff);
}
.btn-primary:hover, .btn-success:hover { color: #fff; background: #383838; border-color: #383838; }
.btn-danger { color: #a32632; background: #fff1f2; border-color: #ffd9de; }
.btn-warning { color: #754300; background: #fff2d6; border-color: #ffe2a8; }
.badge-online, .label-success { background: #e0f7ec; color: #176949; }
.badge-offline, .label-danger { background: #ffe9eb; color: #a32632; }
.badge-auto, .label-info { background: #ededed; color: #484848; }
.label-warning { background: #fff0d4; color: #754300; }
.badge, .label { border-radius: 6px; }
.help-block, .text-muted { color: var(--text-sub-600, #525866); }
.form-control { border-color: var(--stroke-sub-300, #cacfd8); box-shadow: none; }
.modal-content { box-shadow: 0 12px 40px #0e121b28; }
.modal-header, .modal-footer { border-color: var(--stroke-soft-200, #e1e4ea); }
.modal-title { font-weight: 650; }
.deploy-preflight-targets, .checkbox-list { max-height: 240px; overflow: auto; }
.deploy-preflight .alert { margin-bottom: 6px; }
.checkbox-list { padding: 10px; border-radius: 8px; border: 1px solid var(--stroke-soft-200, #e1e4ea); }
.alert { border-radius: 8px; }

@media (max-width: 760px) {
    body { --frame-margin: 7px; }
    #app-screen { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "sidebar" "main"; grid-template-rows: auto auto 1fr; }
    .workspace-sidebar { border-right: 0; }
    .workspace-brand { display: none; }
    .workspace-sidebar nav.collapse:not(.in) { display: none; }
    .workspace-sidebar .collapsing { display: block; }
    .workspace-menu { display: inline-block; }
    #app-screen { padding: 7px; gap: 4px; border-radius: 18px; }
    .workspace-header { padding: 4px 2px; gap: 6px; min-height: 45px; }
    .workspace-header h1 { font-size: clamp(14px, 4.2vw, 19px); }
    .workspace-refresh-label { display: none; }
    .workspace-account summary { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: start; gap: 9px; padding: 7px 10px; }
    .workspace-avatar { width: 30px; height: 30px; font-size: 13px; }
    .workspace-account > div { left: auto; right: 0; transform: none; }
    .workspace-main { padding: 0; }
    .management-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .management-health, .management-latest { padding: 12px; min-height: 134px; border-radius: 14px; }
    .management-health p strong { font-size: 30px; }
    .management-latest strong { font-size: 14px; }
    .management-toolbar { align-items: stretch; flex-direction: column; gap: 8px; margin: 10px 0; }
    .management-tabs > li > a { padding: 7px 8px; font-size: 13px; }
    .management-search { width: 100%; }
    .auth-box { margin-right: 12px; margin-left: 12px; }
    .panel-heading .btn { float: none !important; margin: 3px 0 3px 8px; }
}


.diff-stats {
    margin-bottom: 12px;
}

.diff-content {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid #e8e6e4;
    border-radius: 4px;
    background: #fff;
}

.diff-file {
    border-bottom: 1px solid #eee;
}

.diff-file:last-child {
    border-bottom: none;
}

.diff-file-header {
    padding: 8px 12px;
    background: #f2eeee;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    font-weight: 600;
}

.diff-file-status {
    float: right;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 11px;
}

.diff-file-added .diff-file-header {
    background: #e6ffed;
}

.diff-file-removed .diff-file-header {
    background: #ffeef0;
}

.diff-file-modified .diff-file-header {
    background: #fff8e6;
}

.diff-file-body {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.45;
}

.diff-line {
    padding: 1px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.diff-line-add {
    background: #e6ffed;
    color: #116329;
}

.diff-line-del {
    background: #ffeef0;
    color: #82071e;
}

/* Central support desk */
html { font-size: 16px; }
#app-screen:has(#tab-support.active) {
    height: calc(100vh - 2 * var(--frame-margin));
    height: calc(100dvh - 2 * var(--frame-margin));
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
}
#app-screen:has(#tab-support.active) .workspace-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#app-screen:has(#tab-support.active) .tab-content { flex: 1; min-height: 0; }
#tab-support, #support-admin-content { height: 100%; }
#support-admin-content :where(button, input) { background: transparent; border: 0; }
#support-admin-content :where(button:focus-visible) { outline: 2px solid var(--primary-base, #335cff); outline-offset: 2px; }
.desk-layout { display: grid; gap: 16px; height: 100%; grid-template-rows: minmax(0, 1fr); }
.desk-split { grid-template-columns: minmax(245px, 33%) minmax(0, 1fr); }
.desk-queue, .desk-detail { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.desk-queue, .desk-queue-tabs, .desk-queue-panel, .desk-queue-results { display: flex; flex-direction: column; }
.desk-queue-tabs, .desk-queue-panel, .desk-queue-results { flex: 1 1 auto; min-height: 0; }
.desk-queue-header, .desk-queue-tabs > :first-child, .desk-filters, .desk-more { flex: 0 0 auto; }
.desk-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: 12px 20px;
}
.desk-queue-header h2, .desk-detail h2 { margin: 0; font-weight: 650; letter-spacing: -.025em; }
.desk-queue-header h2 { font-size: 20px; }
.desk-tabs { padding: 0 18px; border-bottom: 1px solid var(--stroke-soft-200, #e1e4ea); }
.desk-tabs button { border: 0; background: none; }
.desk-tabs button:focus-visible { outline: 2px solid var(--primary-base, #335cff); outline-offset: -3px; }
.desk-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px; }
.desk-search { min-width: min(100%, 275px); flex: 1; display: flex; align-items: center; gap: 8px; }
.desk-search > div { flex: 1; min-width: 0; }
.desk-search-icon { color: var(--text-sub-600, #525866); margin-right: 6px; }
.desk-filter-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk-select, .desk-composer textarea {
    border: 1px solid var(--stroke-soft-200, #e1e4ea);
    background: var(--bg-white-0, #fff);
    color: var(--text-strong-950, #0e121b);
    border-radius: 8px;
    padding: 5px 10px;
    font: inherit;
}
.desk-select { min-height: 32px; max-width: 100%; }
.desk-select:disabled, .desk-composer textarea:disabled { opacity: .65; }
.desk-table-wrap { flex: 0 1 auto; min-height: 100px; overflow: auto; overscroll-behavior: contain; }
.desk-table { width: 100%; font-size: 13px; border-collapse: collapse; text-align: left; }
.desk-table th, .desk-table td { padding: 12px 16px; }
.desk-table td { vertical-align: middle; border-top: 1px solid var(--stroke-soft-200, #e1e4ea); }
.desk-table tr:hover, .desk-table .desk-selected { background: var(--bg-weak-50, #f5f7fa); }
.desk-table td:first-child { min-width: 190px; width: 38%; }
.desk-table td small { display: block; margin-top: 4px; color: var(--text-sub-600, #525866); }
.desk-table td :is(.desk-rail-meta, .desk-mobile-meta) { display: none; }
.desk-split .desk-table td .desk-rail-meta { display: block; }
.desk-table td .desk-unread { color: #343434; font-weight: 650; }
.desk-ticket-link { font-size: 14px; font-weight: 650; color: var(--text-strong-950, #0e121b); overflow-wrap: anywhere; }
.desk-ticket-no { color: var(--primary-base, #335cff); font-variant-numeric: tabular-nums; white-space: nowrap; }
.desk-date { white-space: nowrap; }
.desk-table thead { position: sticky; top: 0; z-index: 1; }
.desk-split .desk-table th:not(:first-child), .desk-split .desk-table td:not(:first-child) { display: none; }
.desk-split .desk-table td:first-child { width: auto; }
.desk-split .desk-filter-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.desk-more { padding: 12px; text-align: center; border-top: 1px solid var(--stroke-soft-200, #e1e4ea); }
.desk-empty { min-height: 140px; display: grid; gap: 8px; place-content: center; text-align: center; color: var(--text-sub-600, #525866); margin: 0; padding: 20px; }
.desk-empty .glyphicon { font-size: 22px; color: var(--text-soft-400, #99a0ae); }
.desk-error, .desk-closed, .desk-private {
    padding: 10px 12px;
    border-radius: 8px;
    margin: 12px 16px;
    background: var(--bg-weak-50, #f5f7fa);
}
.desk-error { color: #a32632; background: #fff1f2; }
.desk-error button { margin-left: 8px; }
.desk-closed { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.desk-private { background: #fff4dc; color: #704500; margin: 0 0 10px; }
.desk-detail-header { padding: 14px 18px; }
.desk-detail-header h2 { font-size: clamp(19px, 2vw, 26px); overflow-wrap: anywhere; }
.desk-detail-header h2:focus { outline: none; }
.desk-detail-number { font-size: 12px; color: var(--text-sub-600, #525866); margin: 8px 0 4px; }
.desk-ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 10px; font-size: 13px; }
.desk-settings { padding: 0 18px 14px; display: grid; gap: 8px; }
.desk-settings form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.desk-settings label, .desk-composer label { display: grid; gap: 5px; margin: 0; font-size: 13px; }
.desk-settings select { min-width: 128px; }
.desk-thread { padding: 14px 18px; }
.desk-thread[data-state="inactive"] { display: none; }
.desk-message {
    background: var(--bg-weak-50, #f5f7fa);
    border: 1px solid var(--stroke-soft-200, #e1e4ea);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}
.desk-message-team { background: #ececec; border-color: #dedede; }
.desk-message-note { background: #fffbf3; border-color: #f0e6cb; }
.desk-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; }
.desk-message-meta time, .desk-message-meta span { color: var(--text-sub-600, #525866); }
.desk-message-meta time { margin-left: auto; }
.desk-message p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 7px 0 0; }
.desk-composer { display: grid; align-items: start; gap: 8px; padding-top: 8px; }
.desk-composer > button { justify-self: start; }
.desk-composer textarea { display: block; width: 100%; max-width: 100%; min-height: 80px; resize: vertical; font-size: 14px; font-weight: 400; }
.desk-files { border: 1px dashed var(--stroke-sub-300, #cacfd8); border-radius: 8px; padding: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.desk-files ul { flex: 1 0 100%; padding-left: 0; list-style: none; margin: 0; }
.desk-files li { display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.desk-attachment-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#support-admin-content .desk-attachment-list button { height: auto; min-height: 32px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.desk-history { margin: 0; padding-left: 20px; }
.desk-history li { padding: 7px 0; }
.desk-history li::marker { color: var(--primary-base, #335cff); }

@media (max-width: 1024px) {
    .desk-split { grid-template-columns: minmax(0, 1fr); }
    .desk-split .desk-queue { display: none; }
}
@media (max-width: 760px) {
    #app-screen:has(#tab-support.active) { grid-template-rows: auto auto minmax(0, 1fr); }
    #workspace-nav.in { max-height: 40dvh; overflow: auto; }
}
@media (max-width: 600px) {
    .desk-table th, .desk-table td { padding: 10px 12px; }
    .desk-table td:first-child { min-width: 160px; }
    .desk-table th:nth-child(4), .desk-table td:nth-child(4),
    .desk-table th:nth-child(5), .desk-table td:nth-child(5) { display: none; }
    .desk-table td .desk-mobile-meta { display: block; }
    .desk-thread, .desk-detail-header, .desk-settings { padding-left: 12px; padding-right: 12px; }
    .desk-filter-controls { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    #support-admin-content *, #support-admin-content *::before, #support-admin-content *::after { transition-duration: 0s !important; }
}


.diff-line-mod {
    background: #fff8e6;
    color: #7d4e00;
}
