.flow-embedded,
.flow-embedded.is-open,
.flow-embedded.is-standalone {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    width: 100%;
    background: transparent;
}

.flow-embedded .job-modal__backdrop,
.flow-embedded .job-dialog__close,
.flow-embedded .job-dialog__head {
    display: none;
}

.flow-embedded .flow-dialog,
.flow-embedded.is-standalone .flow-dialog {
    display: block;
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.flow-embedded [hidden] {
    display: none !important;
}

.flow-profile-form {
    display: block;
}

.flow-profile-form .report-config-card {
    margin-bottom: 16px;
    padding: 22px;
}

.flow-profile-form .report-card-head {
    margin-bottom: 16px;
}

.flow-profile-form .report-scope-card .field {
    width: 100%;
}

.flow-profile-form .report-scope-card select {
    width: 100%;
}

.report-scope-mask[hidden],
.report-scope-modal[hidden],
.flow-profile-form .report-profile-ready[hidden],
.flow-profile-form .m-report-profile-ready[hidden] {
    display: none !important;
}

.report-scope-search {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #dce3eb;
    border-radius: 9px;
    background: #fff;
    font: inherit;
}

.flow-profile-form .report-edit-link {
    margin-left: auto;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.flow-profile-form .report-edit-link[hidden] {
    display: none !important;
}

.flow-profile-form .flow-profile-grid[hidden] {
    display: none !important;
}

.flow-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.flow-profile-grid .field--wide {
    grid-column: 1 / -1;
}

.flow-profile-form .field label,
.flow-profile-form .field input,
.flow-profile-form .field select {
    max-width: 100%;
}

.flow-profile-form .field input:not([type="checkbox"]):not([type="hidden"]),
.flow-profile-form .field select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.flow-profile-form .report-pref-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.flow-profile-form .report-pref {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid #e0e5ec;
    border-radius: 9px;
    background: #fff;
}

.flow-profile-form .model-analysis-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e5ec;
    border-radius: 10px;
}

.flow-profile-form .model-analysis-copy {
    flex: 1;
}

.flow-profile-form .model-analysis-copy small {
    display: block;
    color: #66758a;
}

.flow-profile-form .dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.flow-profile-form .dialog-actions button {
    border: 0;
    border-radius: 9px;
    background: #d40012;
    color: #fff;
    padding: 13px 20px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.flow-embedded .analysis-loading,
.flow-embedded .analysis-result,
.flow-embedded .quick-login-state {
    padding: 24px;
    border-radius: 12px;
    background: #fff;
}

.flow-embedded .analysis-result {
    overflow-x: auto;
}

.flow-embedded .job-flow-metrics,
.flow-embedded .job-flow-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.flow-embedded .job-flow-metrics span,
.flow-embedded .job-flow-filters button {
    padding: 9px 13px;
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    background: #fff;
}

.flow-embedded .job-flow-filters button[aria-pressed="true"] {
    border-color: #d40012;
    color: #d40012;
}

.report-history-item small,
.m-report-history-item small {
    display: block;
    margin-top: 3px;
    color: #8793a3;
    font-size: 12px;
    line-height: 1.45;
}

.m-report-history-empty {
    margin: 8px 0 0;
    color: #8793a3;
    font-size: 13px;
    display: block;
    padding: 9px 0;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .flow-profile-grid,
    .flow-profile-form .report-pref-grid {
        grid-template-columns: 1fr;
    }

    .flow-profile-form .report-config-card {
        padding: 16px;
    }

    .flow-profile-form .dialog-actions {
        display: grid;
    }
}

/* Mobile assistant uses the supplied assistant.html layout. */
.m-assistant-create-page .flow-profile-form .report-config-card {
    margin: 0 0 8px;
    padding: 9px;
}

.m-assistant-create-page .flow-profile-form .report-card-head {
    margin-bottom: 0;
}

.m-assistant-create-page .report-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.m-assistant-create-page .m-report-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.m-assistant-create-page .m-report-profile-grid > span {
    min-width: 0;
    padding: 5px;
    border: 1px solid #edf0f4;
    border-radius: 7px;
    background: #fafbfc;
}

.m-assistant-create-page .flow-profile-grid {
    margin-top: 10px;
    gap: 10px;
}

.m-assistant-create-page .flow-profile-grid input,
.m-assistant-create-page .flow-profile-grid select {
    font-size: 13px;
}

.m-assistant-create-page .m-assistant-start-btn {
    width: 100%;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.m-assistant-create-page .m-assistant-start-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.m-assistant-create-page .m-assistant-consent,
.m-assistant-create-page .m-model-analysis-option {
    cursor: pointer;
}

.m-assistant-create-page .m-assistant-consent:has(input:focus-visible),
.m-assistant-create-page .m-model-analysis-option:has(input:focus-visible),
.m-assistant-create-page .m-assistant-start-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.m-assistant-create-page .m-report-current-scope .ui-icon svg {
    width: 14px;
    height: 14px;
}

.m-assistant-create-page .quick-login-state {
    padding: 16px;
    border: 1px solid #e8eef3;
    border-radius: 14px;
}

main.m-assistant-create-page {
    margin: 0 auto;
}

.m-assistant-create-page .m-assistant-start-btn {
    min-height: 48px;
    padding: 7px 10px;
    line-height: 1.4;
}

/* Dynamic range options retain the prototype icon and selected-state columns. */
.report-scope-option-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.report-scope-option-state {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    white-space: nowrap;
    font-style: normal;
    font-size: 12px;
}

.report-scope-option-state svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.report-scope-option.active .report-scope-option-state {
    color: var(--brand);
}

/* Report creation follows report-create.html; business fields remain in the same form. */
.pc[data-job-flow="report"] .flow-profile-form .report-config-card {
    padding: 16px 17px;
    margin-bottom: 12px;
}
.pc[data-job-flow="report"] .report-card-head {
    margin-bottom: 0;
}
.pc[data-job-flow="report"] .flow-profile-form .report-pref-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.pc[data-job-flow="report"] .flow-profile-form .report-pref {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 10px;
    border: 1px solid #edf0f4;
    border-radius: 11px;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
}
.pc[data-job-flow="report"] .flow-profile-form .report-pref.active {
    border-color: #ffcbd0;
    background: #fff7f8;
}
.pc[data-job-flow="report"] .flow-profile-form .model-analysis-option {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 11px 13px;
    margin: 0 0 12px;
    border: 1px solid #f0e5e7;
    border-radius: 13px;
    background: linear-gradient(135deg, #fff, #fffafa);
}
.pc[data-job-flow="report"] .model-analysis-copy small {
    color: #929caa;
}
.pc[data-job-flow="report"] .flow-profile-grid {
    margin-top: 13px;
}
.report-area-slot {
    margin-top: 10px;
}
.report-area-slot .field label {
    display: block;
    margin-bottom: 5px;
    color: #65758a;
    font-size: 12px;
}
.report-area-slot input {
    font-size: 13px !important;
}
.report-consent {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    color: #8793a3;
    font-size: 12px;
    cursor: pointer;
}
.pc .report-consent input {
    accent-color: var(--brand);
}
.pc .report-consent .m-assistant-consent-check {
    display: none;
}
[data-job-flow="report"] #analyzeButton {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}
[data-job-flow="report"] #analyzeButton:disabled {
    opacity: .65;
    cursor: wait;
}
[data-job-flow="report"] [data-report-preference]:focus-visible,
[data-job-flow="report"] #analyzeButton:focus-visible,
[data-job-flow="report"] label:has(input:focus-visible) {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
[data-job-flow="report"] [name="preferences[]"][hidden] {
    display: none !important;
}
main.m-report-create-page {
    margin: 0 auto;
}
.mobile[data-job-flow="report"] .flow-profile-form .report-config-card {
    margin: 0 0 8px;
    padding: 9px;
}
.mobile[data-job-flow="report"] .flow-profile-form .report-card-head {
    margin-bottom: 0;
}
.mobile[data-job-flow="report"] .report-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.mobile[data-job-flow="report"] .m-report-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.mobile[data-job-flow="report"] .flow-profile-grid {
    margin-top: 10px;
    gap: 10px;
}
.mobile[data-job-flow="report"] .flow-profile-grid input,
.mobile[data-job-flow="report"] .flow-profile-grid select {
    font-size: 13px;
}
.mobile[data-job-flow="report"] .m-report-prefs button {
    min-width: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.mobile[data-job-flow="report"] .report-pref-count {
    color: #929caa;
    font-size: 12px;
    white-space: nowrap;
}
.mobile[data-job-flow="report"] .report-pref-count b {
    color: var(--brand);
}
.mobile[data-job-flow="report"] #analyzeButton {
    width: 100%;
    text-align: left;
}
.mobile[data-job-flow="report"] .m-report-history {
    margin-top: 8px;
}
.mobile[data-job-flow="report"] .m-report-history-head > a {
    color: var(--brand);
    font-size: 12px;
    white-space: nowrap;
}
.mobile[data-job-flow="report"] .m-report-history-item b {
    overflow-wrap: anywhere;
}
.mobile[data-job-flow="report"] .m-report-history-empty {
    display: grid;
    margin: 0;
    padding: 9px;
}
.mobile[data-job-flow="report"] .m-report-history-empty p {
    margin: 3px 0 0;
    font-size: 12px;
}
@media (max-width: 1000px) {
    .pc[data-job-flow="report"] .flow-profile-form .report-pref-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
