html[coach-desktop-shell] #app .profile-grading-control { display: none; }
/* Desktop-only presentation. Feature forms and authenticated actions are shared. */
html[data-desktop-pages] #workspace-shell { visibility: hidden; }
#desktop-page-host {
    position: fixed; inset: 0 auto 0 0; z-index: 300;
    display: flex; flex-direction: column; width: 100%; height: 100dvh;
    min-width: 0; overflow: hidden; box-sizing: border-box;
    background: var(--paper, #fff); color: var(--ink-900, #25252a);
}
#desktop-page-host[hidden] { display: none !important; }
html:has(#coach-debug-panel:not([hidden])) #desktop-page-host { width: 66.666667%; }
.desktop-page-navigation {
    display: flex; align-items: center; gap: 12px; flex: none; min-height: 32px;
    padding: 4px 46px 4px 10px; box-sizing: border-box;
    background: var(--control-accent-soft, #f7f3fc); border-bottom: 1px solid var(--line, #e5e1eb);
}
.desktop-page-navigation h1 { margin: 0; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-page-navigation[hidden] { display: none !important; }
#desktop-page-back { flex: none; min-height: 34px; padding: 6px 10px; font-size: 13px; }
.desktop-page-content { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
#desktop-page-host dialog[data-desktop-page] {
    position: relative !important; inset: 0 !important; transform: none !important;
    display: block !important; box-sizing: border-box; width: 100% !important; height: 100% !important;
    min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important;
    margin: 0 !important; padding: 16px; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; overflow: auto; overscroll-behavior: contain;
    background: var(--paper, #fff);
}
#desktop-page-host dialog[data-desktop-page][hidden] { display: none !important; }
#desktop-page-host #follow-up-dialog[data-desktop-page] { display:flex !important; flex-direction:column; padding:0; overflow:hidden; }
#desktop-page-host #follow-up-dialog[data-desktop-page][hidden] { display:none !important; }
#desktop-page-host #manager-follow-up-dialog[data-desktop-page] { display: flex !important; flex-direction: column; padding: 0; overflow: hidden; }
#desktop-page-host #manager-follow-up-dialog[data-desktop-page][hidden] { display: none !important; }
#desktop-page-host [data-close-dialog],
#desktop-page-host [data-minimize-window],
#desktop-page-host [data-resize-window],
#desktop-page-host button[aria-label^="关闭"],
#desktop-page-host #token-warning-close,
#desktop-page-host #close-refund-dialog,
#desktop-page-host #provider-settings-dialog > button { display: none !important; }
#desktop-page-host .usage-modal-heading,
#desktop-page-host .dialog-header > h2,
#desktop-page-host .admin-header h2 { display: none; }
#desktop-page-host #admin-dialog { padding: 0; overflow: hidden; }
#desktop-page-host .admin-shell { height: 100%; max-height: none; min-height: 0; }
#desktop-page-host #admin-dialog .admin-header { min-height: 44px; padding: 5px 16px; justify-content: space-between; }
#desktop-page-host #admin-dialog .admin-header h2 { display: block; }
#desktop-page-host #admin-dialog #close-admin-dialog { display: grid !important; }
#desktop-page-host #admin-dialog #close-admin-dialog { display: none !important; }
#desktop-page-host #admin-dialog .admin-window-button,
#desktop-page-host #admin-dialog [data-admin-maximize],
#desktop-page-host #admin-dialog [data-admin-restore],
#desktop-page-host #admin-dialog [data-admin-minimize],
#desktop-page-host .admin-window-button,
#desktop-page-host [data-admin-maximize],
#desktop-page-host [data-admin-restore],
#desktop-page-host [data-admin-minimize],
#desktop-page-host [data-manager-close],
#desktop-page-host [data-close-video] { display: none !important; }
#desktop-page-host #admin-dialog .admin-header { min-height: 44px !important; padding: 5px 16px !important; }
.desktop-page-navigation { min-height: 32px !important; padding: 4px 46px 4px 10px !important; }
#desktop-page-host .admin-header-title { margin-right: auto; }
#desktop-page-host .admin-tabs {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: 6px; padding: 8px 12px; overflow: visible;
}
#desktop-page-host .admin-tabs button { min-width: 0; min-height: 36px; padding: 7px 9px; font-size: 13px; white-space: normal; }
#desktop-page-host .admin-tabs button[hidden] { display: none; }
#desktop-page-host .admin-body { min-width: 0; min-height: 0; padding: 12px; overflow: auto; }
#desktop-page-host .admin-panel { min-width: 0; }
#desktop-page-host .admin-section-heading { flex-wrap: wrap; gap: 10px; }
#desktop-page-host .admin-section-heading h3 { font-size: 18px; }
#desktop-page-host .product-sku-heading > button { flex: none; white-space: nowrap; min-width: 90px; }
#desktop-page-host .product-sku-pagination > label { white-space: nowrap; }
#desktop-page-host .usage-modal-form { width: 100%; max-width: none; box-sizing: border-box; }
#desktop-page-host input, #desktop-page-host textarea, #desktop-page-host select { max-width: 100%; box-sizing: border-box; }
#desktop-page-host .dialog-header { cursor: default; }
#desktop-page-host .admin-tabs {
    display: flex !important; flex-wrap: wrap !important; grid-template-columns: none !important;
    gap: 8px !important; padding: 10px 16px !important; overflow: visible !important;
    background: #fff !important; border-bottom: 1px solid #e5e5ea !important;
}
#desktop-page-host .admin-tabs button {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; min-height: 40px !important;
    padding: 7px 13px !important; gap: 8px !important;
    border: 1px solid transparent !important; border-radius: 11px !important;
    background: transparent !important; color: #4a4a4f !important;
    font-size: 13px !important; font-weight: 600 !important; white-space: nowrap !important;
}
#desktop-page-host .admin-tabs button span { display: inline !important; }
#desktop-page-host .admin-tabs button svg { width: 17px !important; height: 17px !important; flex: none !important; }
#desktop-page-host .admin-tabs button:hover { background: #f2f2f7 !important; color: #1d1d1f !important; }
#desktop-page-host .admin-tabs button[aria-selected="true"] {
    background: #f1e9fb !important; color: #673899 !important; border-color: #e5d6f4 !important;
}
#desktop-page-host .admin-body { background: #f5f5f7 !important; }
#desktop-page-host #admin-dialog .admin-header {
    background: linear-gradient(90deg, var(--sales-blue-50, #eef5ff), #ffffff 78%) !important;
    border-bottom: 1px solid var(--reference-border, #dfe6e2) !important;
}
#desktop-page-host #admin-dialog .admin-header {
    display: flex !important; align-items: center !important; gap: 10px !important; padding-right: 70px !important;
}
#desktop-page-host #admin-dialog .admin-header-actions { order: 1 !important; margin: 0 !important; gap: 2px !important; }
#desktop-page-host #admin-dialog .admin-header-title { order: 2 !important; margin-right: auto !important; }
#desktop-page-host .admin-tabs [data-admin-tab="advanced"] { order: 99 !important; margin-left: auto !important; }
/* Desktop shell keeps table density even when Windows display scaling reduces CSS width. */
#desktop-page-host .chat-history-table thead { display: table-header-group !important; }
#desktop-page-host .chat-history-table tbody tr { display: table-row !important; padding: 0 !important; border-bottom: 0 !important; }
#desktop-page-host .chat-history-table td { border-bottom: 1px solid #efebf2 !important; padding: 8px 6px !important; }
#desktop-page-host .chat-history-table td:nth-child(n+4) { grid-column: auto !important; }
#desktop-page-host .chat-history-table td::before { content: none !important; }
#desktop-page-host .chat-history-table { min-width: 680px; table-layout: auto !important; }
#desktop-page-host .chat-history-table .admin-data-table { min-width: 680px; }
#desktop-page-host .admin-tabs {
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important; padding: 10px 14px !important;
}
#desktop-page-host .admin-tabs button { justify-content: flex-start !important; white-space: normal !important; text-align: left !important; }
#desktop-page-host .admin-tabs [data-admin-tab="advanced"] { order: 0 !important; margin-left: 0 !important; }
@media (max-width: 480px) {
    #desktop-page-host .admin-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
#desktop-page-host .admin-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
#desktop-page-host .admin-tabs button {
    font-size: 12.5px !important; padding: 7px 10px !important; gap: 6px !important;
    white-space: nowrap !important; min-height: 38px !important;
}
#desktop-page-host .admin-tabs button span { white-space: nowrap !important; }
#desktop-page-host .admin-tabs [data-admin-tab="advanced"] { order: 999 !important; margin-left: 0 !important; }
#admin-tabs-display-toggle {
    width: 32px !important; min-width: 32px !important; height: 32px !important; min-height: 32px !important;
    padding: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    border: 1px solid #e5e5ea !important; border-radius: 9px !important; background: #fff !important; color: #6e6e73 !important;
}
#admin-tabs-display-toggle:hover { background: #f2f2f7 !important; color: #1d1d1f !important; }
#admin-tabs-display-toggle svg { width: 16px !important; height: 16px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.7 !important; }
#desktop-page-host .admin-tabs.icons-only { grid-template-columns: repeat(auto-fit, 42px) !important; justify-content: start !important; }
#desktop-page-host .admin-tabs.icons-only button:not(.admin-tabs-display-toggle) {
    width: 42px !important; min-width: 42px !important; min-height: 40px !important; padding: 0 !important; justify-content: center !important;
}
#desktop-page-host .admin-tabs.icons-only button:not(.admin-tabs-display-toggle) span { display: none !important; }
#desktop-page-host .chat-history-table { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; font-size: 11px !important; }
#desktop-page-host .chat-history-table .admin-data-table { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; }
#desktop-page-host .chat-history-table th, #desktop-page-host .chat-history-table td { padding: 6px 4px !important; font-size: 11px !important; }
#desktop-page-host .chat-history-table th:nth-child(1) { width: 24px !important; }
#desktop-page-host .chat-history-table th:nth-child(2) { width: 26px !important; }
#desktop-page-host .chat-history-table th:nth-child(4) { width: 84px !important; }
#desktop-page-host .chat-history-table th:nth-child(5), #desktop-page-host .chat-history-table th:nth-child(6) { width: 42px !important; }
#desktop-page-host .chat-history-table th:last-child { width: 66px !important; }
#desktop-page-host .chat-history-table td button { min-height: 28px !important; padding: 3px 6px !important; font-size: 10px !important; }
#desktop-page-host .chat-history-table th:nth-child(1) { width: 28px !important; }
#desktop-page-host .chat-history-table th:nth-child(2) { width: 30px !important; }
#desktop-page-host .chat-history-table th:nth-child(4) { width: 128px !important; }
#desktop-page-host .chat-history-table th:nth-child(5), #desktop-page-host .chat-history-table th:nth-child(6) { width: 58px !important; }
#desktop-page-host .chat-history-table th:last-child { width: 84px !important; }
#desktop-page-host .chat-history-table th, #desktop-page-host .chat-history-table td {
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
}
#desktop-page-host .outcomes-cards { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; }
#desktop-page-host .outcomes-card { min-height: 84px !important; padding: 12px 14px !important; gap: 12px !important; }
#desktop-page-host .outcomes-card-value { font-size: 42px !important; }
#desktop-admin-back {
    width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important;
    margin-right: 8px !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important;
    background: transparent !important; color: #673899 !important; font-size: 20px !important; line-height: 1 !important;
    display: inline-grid !important; place-items: center !important; cursor: pointer !important;
}
#desktop-admin-back:hover { background: #f2eafa !important; }
#desktop-page-host .admin-tabs:not(.icons-only) { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
#desktop-page-navigation { display: none !important; }
#desktop-page-host .desktop-page-back {
    width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important;
    margin-right: 8px !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important;
    background: transparent !important; color: #673899 !important; font-size: 20px !important; line-height: 1 !important;
    display: inline-grid !important; place-items: center !important; cursor: pointer !important;
}
#desktop-page-host .desktop-page-back:hover { background: #f2eafa !important; }
#desktop-page-host dialog[data-desktop-page] .dialog-header,
#desktop-page-host dialog[data-desktop-page] .chat-history-heading,
#desktop-page-host dialog[data-desktop-page] .usage-modal-heading {
    background: linear-gradient(180deg, #fbf8ff 0%, #f5effb 100%) !important;
    border-bottom: 1px solid #eee5f6 !important;
}
#desktop-page-host dialog[data-desktop-page] .dialog-header h2,
#desktop-page-host dialog[data-desktop-page] .chat-history-heading h2,
#desktop-page-host dialog[data-desktop-page] .usage-modal-heading h2 {
    font-size: 17px !important; font-weight: 600 !important; letter-spacing: -.01em !important;
}
#desktop-page-host dialog[data-desktop-page] .admin-header h2 {
    font-size: 17px !important; font-weight: 600 !important; letter-spacing: -.01em !important;
}
.desktop-page-navigation { display: none !important; }
html[coach-desktop-shell] #ai-coach-zone .assistant-header-actions button:hover,
html[coach-desktop-shell] #ai-coach-zone .assistant-header-actions button:focus-visible { background: transparent !important; }
#desktop-page-host #follow-up-dialog .follow-up-header-leading .admin-history-button {
    width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important;
}
#desktop-page-host #follow-up-dialog .follow-up-header-leading .admin-history-button svg {
    width: 18px !important; height: 18px !important;
}
#desktop-page-host #follow-up-dialog .follow-up-header-leading .admin-history-button { display: inline-grid !important; }
#desktop-page-host #follow-up-dialog .dialog-header-actions { padding-right: 78px !important; }
#desktop-page-host #follow-up-dialog .dialog-header-actions .admin-history-button {
    width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important;
}
#desktop-page-host #follow-up-dialog .dialog-header-actions .admin-history-button svg {
    width: 18px !important; height: 18px !important;
}
