/* Shared visual language for the service desk and its standalone workspaces. */
:root {
    --zs-brand: #2563eb;
    --zs-brand-hover: #1d4ed8;
    --zs-brand-tint: #eff6ff;
    --zs-canvas: #f3f6fb;
    --zs-card: #fff;
    --zs-card-soft: #f8fafc;
    --zs-heading: #172033;
    --zs-copy: #344054;
    --zs-secondary: #64748b;
    --zs-stroke: #dce4ef;
    --zs-stroke-strong: #b6c4d6;
    --zs-brand-line: #bfdbfe;
    --zs-white: #fff;
    --zs-success: #15803d;
    --zs-success-tint: #f0fdf4;
    --zs-warning: #92400e;
    --zs-warning-tint: #fffbeb;
    --zs-danger: #b91c1c;
    --zs-danger-hover: #991b1b;
    --zs-danger-tint: #fef2f2;
    --zs-nav: #172338;
    --zs-nav-surface: #223149;
    --zs-nav-stroke: #42516a;
    --zs-nav-copy: #d5deec;
    --zs-nav-muted: #aebed4;
    --zs-nav-hover: #263852;
    --zs-nav-active: #254c83;
    --zs-nav-focus: #9bc4ff;
    --zs-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --zs-text-small: 12px;
    --zs-text-body: 13px;
    --zs-text-title: 20px;
    --zs-space-1: 4px;
    --zs-space-2: 8px;
    --zs-space-3: 12px;
    --zs-space-4: 16px;
    --zs-space-6: 24px;
    --zs-radius-card: 10px;
    --zs-radius-control: 6px;
    --zs-radius-dialog: 14px;
    --zs-height-compact: 32px;
    --zs-height-touch: 44px;
    --zs-focus: 0 0 0 3px rgb(37 99 235 / 16%);
    --zs-shadow-overlay: 0 16px 48px rgb(15 23 42 / 16%);
    --zs-shadow: none;
    --zs-corner: 10px;
    --zs-control-corner: 8px;
}

body.zs-console,
body.zs-standalone {
    background: var(--zs-canvas);
    color: var(--zs-heading);
    font-family: var(--zs-font);
}

/* Main desk: retain each module's layout while aligning its surfaces and hierarchy. */
body.zs-console {
    --bg: var(--zs-canvas);
    --panel: var(--zs-card);
    --text: var(--zs-heading);
    --muted: var(--zs-secondary);
    --border: var(--zs-stroke);
    --primary: var(--zs-brand);
    --primary-dark: var(--zs-brand-hover);
    --zs-accent: var(--zs-brand);
    --zs-accent-hover: var(--zs-brand-hover);
    --zs-accent-soft: var(--zs-brand-tint);
    --zs-line: var(--zs-stroke);
    --zs-surface: var(--zs-card-soft);
}
body.zs-console :is(.panel, .ai-video-panel, .ai-video-job, .collector-install-card, .collector-capability-card, .ai-original-editor-section, .inventory-metrics article) {
    border-color: var(--zs-stroke);
    border-radius: var(--zs-corner);
    background-color: var(--zs-card);
    box-shadow: var(--zs-shadow);
}
body.zs-console :is(.tab-heading h2, .ai-video-panel h3, .ai-original-editor-head h3, .inventory-shelf-head strong) {
    color: var(--zs-heading);
    font-weight: 650;
}
body.zs-console :is(.ai-video-panel > p, .ai-original-editor-head p, .inventory-message, .collector-capability-card p) {
    color: var(--zs-secondary);
}
body.zs-console :is(.ai-original-editor-dialog, .ai-video-dialog, .inventory-dialog) {
    border: 1px solid var(--zs-stroke);
    border-radius: 14px;
}
body.zs-console :is(.ai-original-editor-body, .ai-video-dialog-body) { background: var(--zs-card-soft); }
body.zs-console :is(.ai-original-editor-section-head b, .inventory-dialog-section-head b, .collector-install-steps b) {
    background: var(--zs-brand);
    color: #fff;
}
body.zs-console :is(.ai-video-dropzone, .wdr-dropzone) {
    border-color: #a8bbd2;
    border-radius: 10px;
    background: var(--zs-card-soft);
}
body.zs-console :is(.ai-video-dropzone.dragging, .wdr-dropzone.wdr-drag-active) {
    border-color: var(--zs-brand);
    background: var(--zs-brand-tint);
}
body.zs-console :is(.inventory-switch input:checked + i, .inventory-capacity-track i) { background: var(--zs-brand); }
body.zs-console :is(.inventory-match-result:hover, .inventory-selected-product) {
    border-color: #bfdbfe;
    background: var(--zs-brand-tint);
}
body.zs-console :is(.inventory-match-result em, .inventory-selected-product span) { color: var(--zs-brand-hover); }
body.zs-console :is(.p1688-summary-card, .ai-original-metric, .inventory-metrics article) { border-color: var(--zs-stroke); }
body.zs-console .products-1688-page {
    --p1688-ink: var(--zs-heading);
    --p1688-muted: var(--zs-secondary);
    --p1688-line: var(--zs-stroke);
    --p1688-blue: var(--zs-brand);
}
body.zs-console :is(.products-1688-heading .ai-original-eyebrow, .ai-original-eyebrow) { color: var(--zs-brand); }
body.zs-console :is(.collector-plugin-brand, .collector-capability-icon, .ai-video-drop-icon) {
    background: var(--zs-brand-tint);
    color: var(--zs-brand-hover);
    box-shadow: none;
}
body.zs-console :is(.collector-plugin-panel, .collector-plugin-hero) { background: var(--zs-card); }

/* Standalone pages use the same tokens for navigation, forms, tables and cards. */
body.zs-standalone {
    --ink: var(--zs-heading);
    --muted: var(--zs-secondary);
    --line: var(--zs-stroke);
    --blue: var(--zs-brand);
    --blue2: var(--zs-brand-hover);
    --indigo: var(--zs-brand);
    --indigo-soft: var(--zs-brand-tint);
    --canvas: var(--zs-canvas);
    --surface-soft: var(--zs-card-soft);
    --bg: var(--zs-canvas);
}
body.zs-standalone :is(.topbar, .bar) {
    background: #fff;
    color: var(--zs-heading);
    border-bottom: 1px solid var(--zs-stroke);
    box-shadow: none;
}
body.zs-standalone :is(.brand-meta, .brand small, .bar .brand small, .topbar-actions) { color: var(--zs-secondary); }
body.zs-standalone :is(.brand-mark, .mark) {
    background: var(--zs-brand-tint);
    color: var(--zs-brand-hover);
    box-shadow: none;
    border-color: #bfdbfe;
}
body.zs-standalone :is(.back-link, .back, .bar a) {
    color: var(--zs-copy);
    border: 1px solid var(--zs-stroke);
    background: #fff;
    border-radius: var(--zs-control-corner);
}
body.zs-standalone :is(.panel, .stat, .metric, .group-card, .provider) {
    border-color: var(--zs-stroke);
    border-radius: var(--zs-corner);
    background-color: var(--zs-card);
    box-shadow: var(--zs-shadow);
}
body.zs-standalone :is(.filter-panel, .filters, .provider, .table-wrap) { border-color: var(--zs-stroke); }
body.zs-standalone :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .store-trigger) {
    border-color: var(--zs-stroke);
    border-radius: var(--zs-control-corner);
    background-color: #fff;
    color: var(--zs-heading);
}
body.zs-standalone :is(input, select, textarea, .store-trigger):focus-visible {
    outline: none;
    border-color: var(--zs-brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
body.zs-standalone :is(button.primary, .primary) { background: var(--zs-brand); color: #fff; border-color: var(--zs-brand); }
body.zs-standalone :is(button.primary, .primary):hover:not(:disabled) { background: var(--zs-brand-hover); }
body.zs-standalone :is(th, thead th) { background: var(--zs-card-soft); color: #526176; border-color: var(--zs-stroke); }
body.zs-standalone :is(td, tbody td) { border-color: #edf1f5; }
body.zs-standalone :is(.tabs .active, .tab.active) { color: var(--zs-brand); border-color: var(--zs-brand); }
body.zs-standalone :is(a:not(.back):not(.back-link), .link-btn) { color: var(--zs-brand-hover); }
body.zs-standalone :is(dialog, .ai-original-editor-dialog) { border: 1px solid var(--zs-stroke); border-radius: 14px; }
body.zs-standalone :is(button, a):focus-visible { outline: 2px solid var(--zs-brand); outline-offset: 3px; }
body.zs-standalone :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--zs-brand); }

/* Credential settings has a hero of its own; keep it quiet and readable. */
body.zs-standalone .hero { color: var(--zs-heading); background: #fff; border: 1px solid var(--zs-stroke); box-shadow: var(--zs-shadow); }
body.zs-standalone .hero p, body.zs-standalone .account { color: var(--zs-secondary); }
body.zs-standalone .account b { color: var(--zs-heading); }

@media (prefers-reduced-motion: reduce) {
    body.zs-console *, body.zs-standalone * { scroll-behavior: auto !important; }
}

/* Shared controls also cover task management, authentication and detail pages. */
body.zs-standalone {
    --primary: var(--zs-brand);
    --primary-dark: var(--zs-brand-hover);
    --text: var(--zs-heading);
    --border: var(--zs-stroke);
    font-size: 13px;
    line-height: 1.5;
}
body.zs-standalone :is(button, .button, .btn) {
    font: inherit;
    font-weight: 600;
    min-height: 38px;
    border-radius: var(--zs-control-corner);
    padding: 8px 13px;
}
body.zs-standalone :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]), select) {
    min-height: 38px;
    padding: 8px 11px;
    font: inherit;
    box-sizing: border-box;
    max-width: 100%;
}
body.zs-standalone textarea { font: inherit; padding: 10px 11px; line-height: 1.6; }
body.zs-standalone :is(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .6; }
body.zs-standalone :is(.task, .login-panel, .table, .table-wrap) {
    border-radius: var(--zs-corner);
    border-color: var(--zs-stroke);
    box-shadow: var(--zs-shadow);
}
body.zs-standalone :is(h1, h2, h3) { font-weight: 650; }
body.zs-standalone h1 { font-size: 24px; }
body.zs-standalone h2 { font-size: 18px; }
body.zs-standalone th { font-size: 12px; font-weight: 600; }
body.zs-standalone td { font-size: 13px; }
body.zs-standalone tbody tr:hover { background-color: var(--zs-card-soft); }
body.zs-standalone .empty { color: var(--zs-secondary); background: var(--zs-card-soft); border-color: var(--zs-stroke); }
body.zs-auth { background: var(--zs-canvas); }
body.zs-auth :is(.header, .login-header) { background: var(--zs-card-soft); color: var(--zs-heading); border-bottom: 1px solid var(--zs-stroke); }
body.zs-auth :is(.header, .login-header)::after { display: none; }
body.zs-auth :is(.company, .subtitle) { color: var(--zs-secondary); }
body.zs-auth button { background: var(--zs-brand); color: #fff; border-color: var(--zs-brand); }
body.zs-auth button:hover:not(:disabled) { background: var(--zs-brand-hover); }
body.zs-auth :is(.panel, .login-panel) { border: 1px solid var(--zs-stroke); box-shadow: var(--zs-shadow); }
@media (max-width: 600px) {
    body.zs-standalone :is(.toolbar, .heading) { flex-wrap: wrap; }
    body.zs-standalone :is(.table, .table-wrap) { overflow-x: auto; }
}
body.zs-auth :is(.company-name, .company-name-en, .login-subtitle) { color: var(--zs-secondary); }
body.zs-auth :is(h1, .login-header h1) { color: var(--zs-heading); }

/* Unified workbench scale: shared by embedded and standalone modules. */
:root {
    --zs-control-height: 38px;
    --zs-space: 16px;
    --zs-control-corner: 8px;
    --zs-corner: 10px;
}
:is(body.zs-console, body.zs-standalone) :is(.tab-heading, .heading, .panel-heading) { gap: 16px; }
:is(body.zs-console, body.zs-standalone) :is(.tab-heading h2, .page-heading h1) { font-size: 20px; line-height: 1.4; margin: 0; }
:is(body.zs-console, body.zs-standalone) :is(.tab-heading p, .heading p) { margin: 6px 0 0; line-height: 1.6; color: var(--zs-secondary); }
:is(body.zs-console, body.zs-standalone) :is(button.primary, a.primary, button.secondary, a.secondary, button.danger) {
    box-sizing: border-box; min-height: var(--zs-control-height); border-radius: var(--zs-control-corner);
    padding: 8px 14px; font: inherit; font-weight: 600; line-height: 20px; text-decoration: none;
}
:is(body.zs-console, body.zs-standalone) :is(a.primary, button.primary) { background: var(--zs-brand); color: #fff; box-shadow: none; }
:is(body.zs-console, body.zs-standalone) :is(button, a)[aria-busy="true"] { cursor: wait; }
:is(body.zs-console, body.zs-standalone) :is(.p1688-toolbar, .inventory-toolbar, .zs-filter-panel) { padding: 16px; gap: 12px; background: var(--zs-card-soft); }
:is(body.zs-console, body.zs-standalone) :is(.order-bulk-bar, .p1688-batch-bar, .store-link-bulk, .market-list-toolbar) { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
:is(body.zs-console, body.zs-standalone) :is(.p1688-summary-card, .ai-original-metric) { border-radius: var(--zs-corner); box-shadow: var(--zs-shadow); }
.zs-feedback { display: block; padding: 10px 12px; border: 1px solid var(--zs-stroke); border-radius: var(--zs-control-corner); background: var(--zs-card-soft); color: var(--zs-copy); line-height: 1.6; overflow-wrap: anywhere; }
.zs-feedback:empty, .zs-feedback[hidden] { display: none; }
.zs-feedback[data-ui-state="loading"] { background: var(--zs-brand-tint); color: var(--zs-brand-hover); }
.zs-feedback[data-ui-state="success"] { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.zs-feedback[data-ui-state="partial"] { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.zs-feedback[data-ui-state="error"], .zs-feedback[data-ui-state="denied"] { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.zs-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.zs-table-scroll:focus-visible { outline: 2px solid var(--zs-brand); outline-offset: -2px; }
.zs-table-scroll :is(td.empty-state, td.empty, td.p1688-empty, .order-loading-row > td) { padding: 0; text-align: left; }
.zs-table-state { box-sizing: border-box; position: sticky; left: 0; width: var(--zs-table-width, 100%); max-width: var(--zs-table-width, 100%); padding: 28px 16px; text-align: center; white-space: normal; overflow-wrap: anywhere; color: var(--zs-secondary); }
.zs-table-state button { margin: 10px 6px 0; }
.zs-state-hint { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; color: inherit; }
tbody[data-ui-state="error"] .zs-table-state, tbody[data-ui-state="denied"] .zs-table-state { color: #991b1b; }
.zs-selection-scope { color: var(--zs-secondary); font-size: 12px; line-height: 1.5; }
@media (max-width: 700px) {
    :is(body.zs-console, body.zs-standalone) :is(.tab-heading, .heading, .toolbar, .panel-heading) { flex-wrap: wrap; }
    :is(body.zs-console, body.zs-standalone) :is(.order-heading-tools, .products-1688-heading-actions, .inventory-heading-actions) { width: 100%; flex-wrap: wrap; gap: 8px; }
    :is(body.zs-console, body.zs-standalone) :is(.order-heading-tools, .products-1688-heading-actions) > :is(button, a) { flex: 1 1 auto; text-align: center; }
    body.zs-console :is(.order-market-bar, .inventory-view-tabs) { flex-wrap: wrap; height: auto; overflow: visible; }
    body.zs-console .order-market-source { margin-left: 0; }
    body.zs-console .store-link-bulk > .field { flex: 1 1 120px; min-width: 0; }
    body.zs-console :is(.order-bulk-group, .store-link-selection) { flex-wrap: wrap; max-width: 100%; }
    body.zs-console .order-bulk-bar.active .order-bulk-group { display: flex; }
    body.zs-console .order-bulk-message { width: 100%; white-space: normal; }
    :is(body.zs-console, body.zs-standalone) dialog { box-sizing: border-box; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
    :is(body.zs-console, body.zs-standalone) :is(.zs-advanced-grid, .p1688-toolbar-row) { grid-template-columns: minmax(0, 1fr); }
    .zs-feedback { max-width: 100%; box-sizing: border-box; }
}
.zs-feedback[data-ui-hint]:not([data-ui-hint=""])::after { content: attr(data-ui-hint); display: block; margin-top: 4px; font-size: 12px; }
body.zs-console .p1688-batch-bar > label:not(.p1688-batch-review) { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; white-space:nowrap; }
body.zs-console .p1688-batch-bar > :is(button, .p1688-batch-review, strong) { flex:0 0 auto; }
body.zs-console .p1688-batch-review > span { white-space:nowrap; }

/* Standalone workspaces share the same gutters, rhythm and responsive controls. */
body.zs-standalone {
    --zs-page-gutter: 24px;
    --zs-section-gap: 20px;
}
body.zs-standalone :is(.shell, .page, main, .panel, .section, .provider, .field, .task, .employee-form) {
    min-width: 0;
}
body.zs-standalone > main.shell {
    padding: 24px var(--zs-page-gutter) 48px;
}
body.zs-standalone > main.page {
    width: min(1500px, calc(100% - var(--zs-page-gutter) * 2));
    margin: 24px auto 48px;
}
body.zs-standalone :is(.top, .page-heading, .hero) {
    gap: var(--zs-section-gap);
    margin-bottom: var(--zs-section-gap);
}
body.zs-standalone :is(.top, .page-heading, .hero, .heading, .table-head, .section-heading, .section-head, .person-heading) > div {
    min-width: 0;
    max-width: 100%;
}
body.zs-standalone > .page-heading {
    padding: 24px;
    border-color: var(--zs-stroke);
    border-radius: var(--zs-corner);
    background: var(--zs-card);
    box-shadow: var(--zs-shadow);
}
body.zs-standalone > .page-heading .heading-brand {
    position: relative;
    z-index: 1;
}
body.zs-standalone > main > .hero {
    padding: 24px;
    border-radius: var(--zs-corner);
}
body.zs-standalone .hero p {
    overflow-wrap: anywhere;
}
body.zs-standalone :is(.topbar, .bar, .topbar-inner) {
    gap: 16px;
}
body.zs-standalone :is(.brand, .heading-brand) {
    min-width: 0;
}
body.zs-standalone :is(.brand-mark, .mark) {
    flex-shrink: 0;
}
body.zs-standalone :is(.back-link, .back, .bar > a, a.button, a.btn, .tabs > a) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--zs-control-height);
    white-space: nowrap;
    line-height: 20px;
}
body.zs-standalone :is(.toolbar, .actions, .employee-toolbar, .top-actions, .topbar-actions, .sync-cluster, .items-toolbar) {
    gap: 10px;
}
body.zs-standalone :is(.filters, .filter-panel, .run-grid, .grid, .employee-form, .form-grid) {
    gap: 16px;
}
body.zs-standalone :is(.filters, .filter-panel) {
    background: var(--zs-card-soft);
    border-radius: var(--zs-corner);
    box-shadow: none;
}
body.zs-standalone :is(.field label, .employee-form label) {
    color: var(--zs-copy);
    font-size: 13px;
    font-weight: 600;
}
body.zs-standalone :is(.section, .login-box) {
    border-color: var(--zs-stroke);
    border-radius: var(--zs-corner);
    box-shadow: var(--zs-shadow);
}
body.zs-standalone :is(.stat, .metric) {
    padding: 16px;
}
body.zs-standalone :is(.stat strong, .stat .n, .metric strong, .metric-value) {
    font-variant-numeric: tabular-nums;
}
body.zs-standalone :is(.primary-button, .ghost-button) {
    border-radius: var(--zs-control-corner);
    box-shadow: none;
}
body.zs-standalone .primary-button {
    background: var(--zs-brand);
}
body.zs-standalone :is(.table-head, .section-heading) {
    gap: 12px;
    padding: 16px;
}
body.zs-standalone :is(.table, .table-wrap) {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
body.zs-standalone .table > table {
    min-width: 860px;
}
body.zs-standalone :is(.task-title, .task-details, .employee-content, .employee-note, .hint, .subtitle, .heading-note, .account, .message, .preview-row, .store-option span) {
    overflow-wrap: anywhere;
}
body.zs-standalone :is(.task-controls, .event) > * {
    min-width: 0;
}
body.zs-standalone input[type="file"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    font: inherit;
}
body.zs-standalone input[type="file"]::file-selector-button {
    min-height: 36px;
    margin-right: 8px;
    padding: 6px 10px;
    border: 1px solid var(--zs-stroke);
    border-radius: var(--zs-control-corner);
    background: var(--zs-card-soft);
    color: var(--zs-copy);
    font: inherit;
    cursor: pointer;
}
body.zs-standalone .store-menu {
    width: max(100%, 320px);
    min-width: 0;
    max-width: calc(100vw - var(--zs-page-gutter) * 2 - 34px);
}
body.zs-standalone .store-option {
    align-items: flex-start;
    min-height: 44px;
}
body.zs-standalone .store-option input {
    flex-shrink: 0;
    margin-top: 3px;
}
body.zs-standalone dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
body.zs-standalone :is(.dialog-head, .modal-head, .modal-foot) {
    gap: 12px;
}
body.zs-standalone :is(.dialog-head, .modal-head) > div {
    min-width: 0;
}
body.zs-standalone :is(.pagination, .modal-foot, .items-toolbar) {
    flex-wrap: wrap;
    align-items: center;
}
body.zs-standalone:has(> main > #preview) {
    margin: 0;
    padding: 24px var(--zs-page-gutter) 48px;
}
body.zs-auth {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: 24px 16px;
}
body.zs-auth :is(.panel, .login-panel) {
    max-width: 100%;
}
body.zs-auth :is(.brand, .login-brand) {
    align-items: center;
}
body.zs-auth h1 {
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: .02em;
}

@media (max-width: 900px) {
    body.zs-standalone :is(.top, .table-head, .person-heading, .items-toolbar) {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    body.zs-standalone .task-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.zs-standalone .task-controls textarea {
        grid-column: 1 / -1;
    }
}
@media (max-width: 600px) {
    body.zs-standalone {
        --zs-page-gutter: 12px;
        --zs-section-gap: 16px;
        --zs-control-height: 44px;
        font-size: 14px;
    }
    body.zs-standalone > main.shell {
        padding-top: 16px;
        padding-bottom: 32px;
    }
    body.zs-standalone > main.page {
        margin-top: 16px;
        margin-bottom: 32px;
    }
    body.zs-standalone.embedded :is(main.page, main) {
        width: 100%;
        margin: 0;
        padding: 12px;
    }
    body.zs-standalone :is(.topbar, .bar, .topbar-inner) {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        align-items: center;
        padding-block: 12px;
    }
    body.zs-standalone .bar {
        padding-inline: var(--zs-page-gutter);
    }
    body.zs-standalone :is(.top-actions, .topbar-actions) {
        flex-wrap: wrap;
    }
    body.zs-standalone > .page-heading {
        padding: 16px;
        gap: 16px;
    }
    body.zs-standalone :is(button, .button, .btn, .store-trigger, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]), select) {
        min-height: var(--zs-control-height);
    }
    body.zs-standalone :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]), select, textarea) {
        font-size: 16px;
    }
    body.zs-standalone #rights-text {
        /* This legacy textarea has an inline font shorthand. */
        font-size: 16px !important;
    }
    body.zs-standalone :is(.grid, .run-grid, .form-grid, .employee-form, .login-row) {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    body.zs-standalone :is(.wide, .full, .employee-wide, .category-field) {
        grid-column: 1 / -1;
    }
    body.zs-standalone :is(.filters, .filter-panel) {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    body.zs-standalone.ip-rights .filter-panel {
        grid-template-columns: minmax(0, 1fr);
    }
    body.zs-standalone :is(.filters .store-field, .filter-panel .search) {
        grid-column: 1 / -1;
    }
    body.zs-standalone :is(.filters, .toolbar) {
        max-width: 100%;
    }
    body.zs-standalone > main > .hero {
        padding: 16px;
    }
    body.zs-standalone .toolbar > label {
        flex: 1 1 100%;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    body.zs-standalone :is(.employee-toolbar select, .toolbar > select, .toolbar > label select) {
        width: 100%;
    }
    body.zs-standalone :is(.header-actions, .heading > .toolbar, .section-heading-actions) {
        width: 100%;
        justify-content: flex-start;
    }
    body.zs-standalone :is(.header-actions, .items-toolbar) > button {
        flex: 1 1 auto;
    }
    body.zs-standalone :is(.task-controls, .event, .preview-row) {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    body.zs-standalone .task-controls textarea {
        grid-column: auto;
        min-height: 80px;
    }
    body.zs-standalone .employee-feedback {
        align-items: stretch;
    }
    body.zs-standalone .employee-feedback textarea {
        min-width: 0;
    }
    body.zs-standalone :is(.login-box, .dialog-head, .modal-head) {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    body.zs-standalone .login-box button {
        width: 100%;
    }
    body.zs-standalone .category-step {
        min-width: 0;
        flex-basis: 100%;
    }
    body.zs-standalone .modal-foot > button {
        flex: 1 1 140px;
    }
    body.zs-standalone .modal-body {
        max-height: calc(100dvh - 200px);
        padding: 16px;
    }
    body.zs-standalone .toast {
        box-sizing: border-box;
        max-width: calc(100vw - 24px);
        overflow-wrap: anywhere;
    }
    body.zs-auth {
        padding: 16px 12px;
    }
    body.zs-auth :is(.login-header, .header) {
        padding: 18px;
    }
    body.zs-auth .login-logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }
    body.zs-auth h1 {
        font-size: 20px;
    }
    body.zs-auth .code-row {
        grid-template-columns: minmax(0, 1fr) 126px;
    }
}

/* Empty dates show the existing Chinese prompt or a clean calendar control. */
input.zs-empty-date:not(:focus)::-webkit-datetime-edit {
    opacity: 0;
}
input.zs-empty-date:not(:focus) {
    color: transparent;
}

/* A lighter shared surface for independent workspaces and account pages. */
body.zs-standalone > header {
    background: #fff;
    color: var(--zs-heading);
    border-bottom: 1px solid var(--zs-stroke);
}
body.zs-standalone > header nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
body.zs-standalone :is(.hero, .page-heading) { box-shadow: none; }
body.zs-standalone :is(.filters, .filter-panel) { background: #fff; }
body.zs-standalone :is(.stat, .metric, .task, .section, .provider, .panel, .group-card) { box-shadow: none; }
body.zs-standalone :is(.toolbar, .actions, .table-head, .section-heading) { flex-wrap: wrap; }
body.zs-standalone :is(.toolbar, .actions, .table-head, .section-heading) > * { min-width: 0; max-width: 100%; }
body.zs-standalone .scroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
body.zs-account main { margin: 24px auto; }
body.zs-account h1 { font-size: 24px; line-height: 1.4; }
body.zs-account :is(.metric.featured, .plans .featured) { background: var(--zs-brand-tint); color: var(--zs-heading); border-color: #cddff6; }
body.zs-account :is(.metric.featured, .plans .featured) p { color: var(--zs-secondary); }
body.zs-account .metric.featured strong { color: var(--zs-brand-hover); }
body.zs-account .plans h2 { font-size: 28px; }
body.zs-account .heading p { font-weight: 400; }
@media (max-width: 600px) {
    body.zs-standalone > header { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; }
    body.zs-account main { padding-left: 14px; padding-right: 14px; }
    body.zs-standalone :is(.toolbar, .actions) { gap: 8px; }
}

body.zs-standalone .metric::after { display: none; }
body.zs-standalone .metric { min-height: 96px; }
body.zs-standalone.awp-workspace .live-console { background: var(--zs-card-soft); color: var(--zs-copy); border-color: var(--zs-stroke); box-shadow: none; }
body.zs-standalone.awp-workspace .live-console h2 { color: var(--zs-heading); }
body.zs-standalone.awp-workspace :is(.live-task, .live-refresh-state, .live-log-details summary) { color: var(--zs-secondary); }
body.zs-standalone.awp-workspace :is(.live-counter, .live-console .small) { background: #fff; color: var(--zs-copy); border-color: var(--zs-stroke); }
body.zs-standalone.awp-workspace .live-console .small:hover:not(:disabled) { background: var(--zs-brand-tint); }
body.zs-standalone.awp-workspace .live-log-list { border-color: var(--zs-stroke); }
body.zs-standalone.awp-workspace .live-log-message { color: var(--zs-copy); }
body.zs-standalone.awp-workspace :is(.live-log-time, .live-empty) { color: var(--zs-secondary); }
body.zs-standalone.awp-workspace .live-log-level { color: var(--zs-brand-hover); }
body.zs-standalone.awp-workspace .live-log-row.warning .live-log-level { color: #945b0c; }
body.zs-standalone.awp-workspace .live-log-row.error .live-log-level { color: #b42318; }
body.zs-account .metric.featured > span { color: var(--zs-secondary); }
